
数据分析
color丶瞎
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
The 'normed' kwarg is deprecated, and has been replaced by the 'density' kwarg.
在使用直方图时,出现警告 UserWarning: The 'normed' kwarg is deprecated, and has been replaced by the 'density' kwarg. warnings.warn("The 'normed' kwarg is deprecated, and has been " 意思就是把:normed 换成 density 即...原创 2018-09-08 08:35:27 · 6208 阅读 · 3 评论 -
随笔--防止忘
df=pd.DataFrame(np.random.randn(1000),index=pd.date_range('20170101',periods=1000),columns=['data']) columns=['data'] 列名 periods=1000 从20170101到1000个数据 df['data'].cumsum() cumsum() 累加 cumpr...原创 2018-09-13 20:56:29 · 167 阅读 · 0 评论 -
groupby
groupby col=col.groupby(['id','money'],as_index=False).sum() 按照id 和 money 这两个特征进行转换新表并自动排序 并对其他列进行sum求和 count等 id money a b 1 1 x y 2 1 ...原创 2018-10-04 13:06:15 · 1140 阅读 · 0 评论 -
OSError: Initializing from file failed
在你写好数据后,进行保存, 可以允许进行中文保存 file_name='测试.csv' df.to_csv(file_name) 但是在用数据,读取数据的时候 f=(file_name) df_csv=pd.read_csv(f) print(df_csv) OSError: Initializing from file failed 会报错! 意思是不让你用中文 如果就...原创 2018-09-29 15:47:48 · 388 阅读 · 0 评论 -
数据分析与挖掘知识点-1
train[col].nunique() 统计(该列有多少个不相同的数据)相加 train[col].isnull().sum() 处理缺失值 将列中为空的个数统计出来 train[col].value_counts(normalize=False, sort=True, ascending=False, bins=None, dropna=True) 可以对Series里面的每个值进行计...原创 2019-01-12 09:53:29 · 453 阅读 · 0 评论