问题描述
在Maxcompute使用Mars DataFrame,代码如下
xdf = o.to_mars_dataframe('table')
print("df", xdf[:2].to_pandas()['data_date'])
t = xdf['data_date']
print(“df”, xdf[:2].to_pandas()[‘data_date’]) 能正常执行,但执行 t = xdf[‘data_date’] 时,报KeyError: ‘data_date not in columns’,详细信息如下:
df
0 2021-12-25
1 2021-12-25
Name: data_date, dtype: object
Traceback (most recent call last):
File “”, line 388, in
main_ktfh(“19:30-20:30”)
File “”, line 367, in main_ktfh
sea_df = fun_season_change(s_point, e_point)
File “”, line 337, in fun_season_change
typical_day_df = fun_typical_day(a_df, season_date, d_delta)
File “”, line 235, in fun_typical_day
t = xdf[‘data_date’]
File “/opt/taobao/tbdpapp/pyodps/mars/0.6/mars/dataframe/indexing/getitem.py”, line 430, in dataframe_getitem
raise KeyError(f'{item} not in columns’)
KeyError: ‘data_date not in columns’
期望结果
烦请帮忙确认Mars是否支持此用法,感谢
已尝试的方法
…