数据透视表和分组数据在python熊猫中查找均值

时间:2019-07-04 15:31:49

标签: python-3.x pandas data-science

  

KeyError:无   在处理上述异常期间,发生了另一个异常   KeyError:无

import numpy as np
import pandas as pd 

df = pd.read_csv('https://query.data.world/s/vBDCsoHCytUSLKkLvq851k2b8JOCkF')
df_1 = pd.pivot(df,values=['rain','wind'],index=['month','day']).mean()
print(df_1.head(20))

0 个答案:

没有答案