上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 30 下一页
摘要: import pandas as pd df = pd.DataFrame({"month": [1, 4, 7, 10], "year": [2012, 2014, 2013, 2014], "sale": [55, 40, 84, 31]}) new_df = df.set_index(["year", "month"]) print(new_df.index.names) print(new 阅读全文
posted @ 2019-09-12 02:04 Jumpkin1122 阅读(944) 评论(0) 推荐(0) 编辑
摘要: 运行结果: 阅读全文
posted @ 2019-09-12 02:03 Jumpkin1122 阅读(853) 评论(0) 推荐(0) 编辑
摘要: 存储文件内容 阅读全文
posted @ 2019-09-12 02:02 Jumpkin1122 阅读(256) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd import numpy as np data = pd.read_csv("./data/test.csv") print(data) print(pd.isnull(data)) # 缺失值True,其他False print(np.any(pd.isnull(data))) # 有缺失值True,没有False print(np.... 阅读全文
posted @ 2019-09-12 02:01 Jumpkin1122 阅读(191) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd data = pd.Series([176, 174, 160, 180, 159, 163, 192, 184], index=["No1:176", "No2:174", "No3:160", "No4:180", "No5:159", "No6:163", "No7:192", "No8:184"]) print... 阅读全文
posted @ 2019-09-12 02:00 Jumpkin1122 阅读(854) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 30 下一页