上一页 1 2 3 4 5 6 7 ··· 17 下一页
摘要: 阅读全文
posted @ 2021-09-27 21:40 CodeYaSuo 阅读(70) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-09-27 21:35 CodeYaSuo 阅读(82) 评论(0) 推荐(0) 编辑
摘要: [x 的取值范围, y 的取值范围] 取为真的数据,为假的过滤掉 阅读全文
posted @ 2021-09-27 21:26 CodeYaSuo 阅读(29) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-09-27 21:10 CodeYaSuo 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-09-27 21:08 CodeYaSuo 阅读(26) 评论(0) 推荐(0) 编辑
摘要: pyinstaller -w -p 包所在的位置 -F 代码文件.py -w 关闭 doc 界面 -F 代码文件 -p 导入的包所在的位置 阅读全文
posted @ 2021-09-27 17:50 CodeYaSuo 阅读(32) 评论(0) 推荐(0) 编辑
摘要: myarray = np.random.random(100) results, edges = np.histogram(myarray, normed=True) binWidth = edges[1] - edges[0] plt.bar(edges[:-1], results*binWidt 阅读全文
posted @ 2021-09-27 11:16 CodeYaSuo 阅读(82) 评论(0) 推荐(0) 编辑
摘要: 绘制小提琴图时,出现 ValueError: object arrays are not supported 错误。 在修改了传入的 DataFrame 数据时,将传入要进行绘制的数据进行转换为整数,即可解决此错误。 示例: df['values'] = df['values'].astype('i 阅读全文
posted @ 2021-09-26 14:22 CodeYaSuo 阅读(1041) 评论(0) 推荐(0) 编辑
摘要: 在终端中输入 pip freeze >requirements.txt 阅读全文
posted @ 2021-09-24 11:59 CodeYaSuo 阅读(66) 评论(0) 推荐(0) 编辑
摘要: for path, file_dir, files in os.walk(r'指定路径'): for file_name in files: print(os.path.join(path, file_name)) 阅读全文
posted @ 2021-09-24 09:33 CodeYaSuo 阅读(68) 评论(0) 推荐(0) 编辑
摘要: ax.tick_params(direction='out', length=6, width=2, colors='r', grid_color='r', grid_alpha=0.5) 推荐使用 colors 传递,修改刻度标签颜色 colorscolor Tick color and labe 阅读全文
posted @ 2021-09-23 15:26 CodeYaSuo 阅读(631) 评论(0) 推荐(0) 编辑
摘要: 进行绘制棉棒图 markerline, stemlines, baseline = plt.stem(x,y, ) # 添加默认值 plt.setp(stemlines, color= 'r') 使用 plt.stem(x,y) 进行绘制 使用 setp 方法进行设置 阅读全文
posted @ 2021-09-21 17:04 CodeYaSuo 阅读(138) 评论(0) 推荐(0) 编辑
摘要: from pdf2docx import Converter pdf_file = '1.pdf' docx_file = '1.docx' cv = Converter(pdf_file) cv.convert(docx_file, start=0, end=None) cv.close() 阅读全文
posted @ 2021-09-20 15:59 CodeYaSuo 阅读(662) 评论(0) 推荐(0) 编辑
摘要: 官方文档 https://pyshorteners.readthedocs.io/en/latest/ 安装 pip install pyshorteners 我的版本 Successfully installed certifi-2021.5.30 charset-normalizer-2.0.6 阅读全文
posted @ 2021-09-20 15:23 CodeYaSuo 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 安装 pip install pyqrcode 我的版本:pyqrcode-1.2.1 pip install pypng 我的版本:pypng 0.0.21 这里要注意的是 导入时写法为 import pyqrcode import png import pyqrcode import png f 阅读全文
posted @ 2021-09-20 15:10 CodeYaSuo 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 安装 pip install textblob 我的版本:0.15.3 from textblob import TextBlob string = "you arr best" # 此处的 arr 应为 are TextBlob(string).correct() 阅读全文
posted @ 2021-09-20 14:45 CodeYaSuo 阅读(71) 评论(0) 推荐(0) 编辑
摘要: import socket host_name = socket.gethostname() ip = socket.gethostbyname(host_name) print("本地IP地址是:" + ip) 阅读全文
posted @ 2021-09-20 14:32 CodeYaSuo 阅读(325) 评论(0) 推荐(0) 编辑
摘要: 安装 pip install speedtest-cli 我的是 Successfully installed speedtest-cli-2.1.3 import speedtest、 # 创建测试对象 test = speedtest.Speedtest() down = test.downlo 阅读全文
posted @ 2021-09-20 14:16 CodeYaSuo 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 准备工作 安装第三方库: pip install autoviz xlrd wordcloud 我安装的 autoviz 是 0.0.84 xlrd 是 1.2.0 wordcloud 是 1.8.1 如果你有数据集,如 csv 文件,可以用你自己的。 我这里使用的是 seaborn-data 数据 阅读全文
posted @ 2021-09-20 13:49 CodeYaSuo 阅读(656) 评论(0) 推荐(0) 编辑
摘要: 安装 pip install black 在对应路径的终端中输入 black 文件名.py black hello.py 阅读全文
posted @ 2021-09-19 18:00 CodeYaSuo 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 我出现此问题的原因在于 计算机中 seaborn-data 文件夹内不存在数据 在下载了 GitHub 相关 seaborn-data 之后 https://github.com/mwaskom/seaborn-data 复制到 计算机中 seaborn-data 文件夹内 然后重新运行代码 阅读全文
posted @ 2021-09-19 13:08 CodeYaSuo 阅读(423) 评论(0) 推荐(0) 编辑
摘要: seaborn 版本问题pip uninstall seaborn 使用 0.9.0 版本,可以解决此问题 pip install seaborn==0.9.0 阅读全文
posted @ 2021-09-19 13:00 CodeYaSuo 阅读(828) 评论(0) 推荐(0) 编辑
摘要: 将现有的 pyzmq 库进行卸载 pip uninstall pyzmq 然后安装低版本的 pyzmq==19.0.2 pip install pyzmq==19.0.2 注:我是使用此方式解决的。 阅读全文
posted @ 2021-09-18 23:41 CodeYaSuo 阅读(3507) 评论(0) 推荐(0) 编辑
摘要: n, bins = np.histogram(列表或 np.array对象, 50, normed=True) n = n * np.diff(bins) ax.hist(函数内容) 阅读全文
posted @ 2021-09-17 20:04 CodeYaSuo 阅读(48) 评论(0) 推荐(0) 编辑
摘要: matplotlib.use('agg') from lhz 阅读全文
posted @ 2021-09-17 14:16 CodeYaSuo 阅读(69) 评论(0) 推荐(0) 编辑
摘要: from matplotlib import rcParams #去掉顶部和右侧的线 rcParams['axes.spines.top']= False rcParams['axes.spines.right']= False #设置图的尺寸 rcParams['figure.figsize']= 阅读全文
posted @ 2021-09-14 16:55 CodeYaSuo 阅读(54) 评论(0) 推荐(0) 编辑
摘要: # 设置显示最大列数 与 显示宽度 pd.set_option('display.max_columns',None) pd.set_option('display.width', 300) 阅读全文
posted @ 2021-08-31 10:40 CodeYaSuo 阅读(454) 评论(0) 推荐(0) 编辑
摘要: https://mp.weixin.qq.com/s/Ux66-omtEU6EWEWhjQnnyw 添加标题 plt.title('示例标题') 添加图上面的文字 x y 坐标,文本内容。 plt.text(1,2,'function y=x*x') 注释 xy :备注的坐标点 xytext :备注 阅读全文
posted @ 2021-08-30 09:50 CodeYaSuo 阅读(58) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/sinat_23133783/article/details/109527366 ax.spines['top'].set_visible(False) ax.spines['right'].set_visible(False) ax.spines['bo 阅读全文
posted @ 2021-08-29 16:10 CodeYaSuo 阅读(471) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/htuhxf/article/details/82986440 fig = plt.figure() 参数matpltlib.pyplot.figure( num = None, # 设定figure名称。系统默认按数字升序命名的figure_num(透视 阅读全文
posted @ 2021-08-29 16:04 CodeYaSuo 阅读(298) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/weixin_41789707/article/details/81035997 grid(b, which, axis, color, linestyle, linewidth, **kwargs) b : 布尔值 which : 取值为'major', 阅读全文
posted @ 2021-08-29 15:40 CodeYaSuo 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 参考链接 https://blog.csdn.net/weixin_42227736/article/details/112395017 ax=plt.subplot(111,projection='polar') #设置绘图区域,建立极坐标图 projection='polar' 设置极坐标图 a 阅读全文
posted @ 2021-08-29 15:35 CodeYaSuo 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 参考链接https://blog.csdn.net/weixin_34498545/article/details/112631706 进行初始化 plt.figure(figsize = (8,6)) ax = plt.gca() 调整坐标轴范围 x轴 ax.set_xlim() y轴 ax.se 阅读全文
posted @ 2021-08-29 15:19 CodeYaSuo 阅读(585) 评论(0) 推荐(0) 编辑
摘要: select COLUMN_NAME from INFORMATION_SCHEMA.Columns where table_name='表名称' and table_schema='数据库名称'; 阅读全文
posted @ 2021-08-29 15:04 CodeYaSuo 阅读(148) 评论(0) 推荐(0) 编辑
摘要: select table_name from information_schema.tables where table_schema='数据库名称'; select table_name from information_schema.tables where table_schema='数据库名 阅读全文
posted @ 2021-08-29 15:03 CodeYaSuo 阅读(514) 评论(0) 推荐(0) 编辑
摘要: https://pypi.tuna.tsinghua.edu.cn/simple/ http://mirrors.aliyun.com/pypi/simple/ https://pypi.mirrors.ustc.edu.cn/simple/ http://pypi.douban.com/simpl 阅读全文
posted @ 2021-08-29 14:59 CodeYaSuo 阅读(307) 评论(0) 推荐(0) 编辑
摘要: acorr add_artist add_callback add_child_axes add_collection add_container add_image add_line add_patch add_table angle_spectrum annotate apply_aspect 阅读全文
posted @ 2021-08-29 14:54 CodeYaSuo 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 原文https://www.bilibili.com/video/BV1tt411e7zF?p=6 阅读全文
posted @ 2021-08-29 14:46 CodeYaSuo 阅读(150) 评论(0) 推荐(0) 编辑
摘要: exec code in self.locals 错误主要是因为在 python3 环境下 , 进行 debug 调试,源码没有进行更新导致. 需要将 exec code in self.locals 修改为 exec(code in self.locals) 注: 文件名不要写为 code.py 阅读全文
posted @ 2021-08-27 17:02 CodeYaSuo 阅读(1028) 评论(0) 推荐(0) 编辑
摘要: 读取时,不读取第一列 data = pd.read_csv('data.csv',index_col=0) df_length = 0 for i in df['列名'].values: if i is not np.nan: df_length += 1 print(df_length) 阅读全文
posted @ 2021-08-27 09:32 CodeYaSuo 阅读(439) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 17 下一页