2020年8月26日
摘要: pandas教程5-合并 concat axis (合并方向) axis=0是预设值,因此未设定任何参数时,函数默认axis=0。 import pandas as pd import numpy as np #定义资料集 df1 = pd.DataFrame(np.ones((3,4))*0, c 阅读全文
posted @ 2020-08-26 15:14 ben跑的换行符 阅读(263) 评论(0) 推荐(0) 编辑
摘要: pandas教程-4导入导出 来源 以下均来源与莫烦python 读取csv 示范档案下载 - student.csv import pandas as pd #加载模块 #读取csv data = pd.read_csv('student.csv') #打印出data print(data) 将资 阅读全文
posted @ 2020-08-26 14:55 ben跑的换行符 阅读(229) 评论(0) 推荐(0) 编辑
摘要: pandas简单教程1 Series import pandas as pd import numpy as np s = pd.Series([1,3,6,np.nan,44,1]) print(s) """ 0 1.0 1 3.0 2 6.0 3 NaN 4 44.0 5 1.0 dtype: 阅读全文
posted @ 2020-08-26 09:58 ben跑的换行符 阅读(243) 评论(0) 推荐(0) 编辑
摘要: AttributeError: module 'pandas' has no attribute 'Series' 前提是在命令行可以使用pandas,但是在pycharm里面不能使用。 解决就是文件名写成了pandas,需要把pandas.py这个文件删除,然后就可以了 阅读全文
posted @ 2020-08-26 09:37 ben跑的换行符 阅读(1872) 评论(0) 推荐(0) 编辑