import pandas a=pandas.read_excel(r'D:\scrapy网络爬虫\nba.xlsx') bins=[0,5000000,max(a['Salary'])] group_by=['底','高'] a['new_col']=pandas.cut(a['Salary'], ...
分类:
其他好文 时间:
2020-06-28 14:56:18
阅读次数:
120
1、开口向上的抛物面 fig = plt.figure(figsize=(9,6), facecolor='khaki' ) ax = fig.gca(projection='3d') # 二元函数定义域平面集 x = np.linspace(start=-3, stop=3, num=100 ) ...
分类:
编程语言 时间:
2020-06-28 13:20:21
阅读次数:
63
运行这段代码 import torch import numpy as np import matplotlib.pyplot as plt x = torch.ones(2,2,requires_grad=True) print('x:\n',x) y = torch.eye(2,2,requir ...
分类:
其他好文 时间:
2020-06-28 09:56:40
阅读次数:
254
1.jieba分词与词性标注 思路: (1)利用pandas读取csv文件中的酒店客户评论,并创建3个新列用来存放分词结果、词性标注结果、分词+词性标注结果 (2)利用jieba分词工具的posseg包,同时实现分词与词性标注 (3)利用停用词表对分词结果进行过滤 (4)将分词结果以20000条为单 ...
分类:
编程语言 时间:
2020-06-27 20:32:04
阅读次数:
125
from PIL import Imageimport numpy as npimport numpy.core.numeric as _nximport matplotlib.pyplot as pltimage_name = 'Lenna_(test_image).png'image_name_ ...
分类:
编程语言 时间:
2020-06-27 09:54:03
阅读次数:
94
#!/usr/bin/env python from struct import * import pandas as pd import numpy as np import os import re import pathlib import threading import time def ...
分类:
其他好文 时间:
2020-06-26 20:41:49
阅读次数:
57
a=['序号',1,2,3,4,5] b=['成本',20,45,12,34,67] import pandas c=pandas.Series(a) d=pandas.Series(b) e=pandas.DataFrame(list(zip(c,d))) print(e) 0 1 0 序号 成本 ...
分类:
其他好文 时间:
2020-06-26 18:03:16
阅读次数:
42
#导入需要的包import numpy as npimport paddle as paddleimport paddle.fluid as fluidfrom PIL import Imageimport matplotlib.pyplot as pltimport osBUF_SIZE = 51 ...
分类:
其他好文 时间:
2020-06-26 16:29:35
阅读次数:
71
#!/usr/bin/env python import tensorflow as tf import numpy as np import matplotlib.pyplot as plt # Import MNIST data from tensorflow.examples.tutorial ...
分类:
其他好文 时间:
2020-06-26 16:25:26
阅读次数:
49
select *, rank() over (order by 成绩 desc) as ranking, dense_rank() over (order by 成绩 desc) as dese_rank, row_number() over (order by 成绩 desc) as row_nu ...
分类:
其他好文 时间:
2020-06-26 12:29:01
阅读次数:
94