问题描述
Blockquote
我有3个小时的数据,我想将它们转换为Python中新矩阵中的每日数据。我尝试过类似的方法,但似乎是错误的,我是初学者...
import pandas as pd
df1=pd.read_csv('temp_2019.csv')
p_num=df1.values[:,1].astype(np.float)
time_vec=df1.values[:,0].astype(str)
time_vec=pd.to_datetime(time_vec)
df2=[time_vec,p_num]
daily_values = df2.resample('D').mean()
但是它告诉我'list'对象没有属性'resample',我不知道这是怎么回事...
非常感谢您的帮助
here is a view of my matrix df2 here is a view of my matrix df1
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)