解决 pandas 在读取 excel 文件报出警告的问题 UserWarning: Unknown extension is not supported and will be removed
Python 3.11.9
pandas 2.2.2
openpyxl 3.1.5
data_frame = pd.read_excel(
input_file, "january_2013", index_col=None, engine="openpyxl"
)
出现如下警告:
D:\python311\Lib\site-packages\openpyxl\worksheet\_reader.py:329: UserWarning: Unknown extension is not supported and will be removed
warn(msg)
我的解决方案是:xl 文件中有不能识别的数据类型,一般应该是 自定义
,特别是在日期格式的时候,将其修改为短日期来解决这个问题