求指点:为啥一直报这个错:
TypeError: DatetimeIndex.__init__() takes 1 positional argument but 2 were given (sheet: 0)
pandas 版本:2.2.2
表格格式如下:
代码如下:
import pandas as pd
df = pd.read_excel("test.XLSX")
print(df.head())
报错内容:
File "lib.pyx", line 2697, in pandas._libs.lib.maybe_convert_objects
TypeError: DatetimeIndex.__init__() takes 1 positional argument but 2 were given (sheet: 0)