这是我的代码的相关部分:
df_pandas.columns = df_pandas.columns.str.lower()
df_pandas = df_pandas.rename(columns={'Date': 'date'})
df_pandas = df_pandas.reset_index( )
All the column headers changed to lowercase except Date
: https://i.imgur.com/pQUmmmq.png
I've tried renaming the column but that didn't work either.
试试下面的代码:
我不知道为什么它不起作用,因为您的代码看起来正确。 无论如何,可能的解决方法是创建另一个列并删除旧的Date列。