![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Pandas
Pandas
嘻哈吼嘿呵
这个作者很懒,什么都没留下…
展开
-
七、Pandas—— Plot 画图
import pandas as pdimport numpy as npimport matplotlib.pyplot as plt# plot的方法# plot 折线图, bar 条形图,hist, box, kde, area ,# scatter 散点图, hexbin, pieprint("***************Series*****************...原创 2019-09-27 01:16:25 · 307 阅读 · 0 评论 -
六、Pandas——合并 merge
import pandas as pdimport numpy as np# mergeprint("***************根据指定的单个列进行合并*******************")left = pd.DataFrame({'key': ['K0', 'K1', 'K2', 'K3'], 'A': ['A0', 'A1', ...原创 2019-09-27 00:56:08 · 172 阅读 · 0 评论 -
五、Pandas —— 合并 concat
import pandas as pdimport numpy as np# concatenatingdf1 = pd.DataFrame(np.ones((3, 4))*0, columns=['a', 'b', 'c', 'd'])df2 = pd.DataFrame(np.ones((3, 4))*1, columns=['a', 'b', 'c', 'd'])df3 =...原创 2019-09-26 01:21:25 · 162 阅读 · 0 评论 -
四、Pandas——处理丢失数据
import pandas as pdimport numpy as npdates = pd.date_range("20190101", periods=6)df = pd.DataFrame(np.arange(24).reshape((6, 4)), index=dates, columns=["A", "B", "C", "D"])prin...原创 2019-09-26 00:27:58 · 102 阅读 · 0 评论 -
三、Pandas——设置值
import pandas as pdimport numpy as npdates = pd.date_range("20190101", periods=6)df = pd.DataFrame(np.arange(24).reshape((6, 4)), index=dates, columns=["A", "B", "C", "D"]...原创 2019-09-26 00:05:19 · 97 阅读 · 0 评论 -
二、Pandas ——选择数据
import pandas as pdimport numpy as npdates = pd.date_range("20190101", periods=6)df = pd.DataFrame(np.arange(24).reshape((6, 4)), index=dates, columns=["A", "B", "C", "D"])p...原创 2019-09-25 20:29:14 · 80 阅读 · 0 评论 -
一、Pandas —— 基本介绍
import pandas as pdimport numpy as npprint("************Series*************")print("=========从Array 生成 Series===========")#数据类型 dtype: float64,行 列名字默认 0-n 的数字s = pd.Series([1, 3, 6, np.nan,...原创 2019-09-25 01:47:15 · 140 阅读 · 0 评论