通常,读取excel工作表将使用excel工作表中定义的dtype,但是您不能指定dtype
read_csv,例如,例如。您可以提供一个
convertersarg,您可以为其传递列的字典和func来调用以转换列:
df1 = pd.read_excel(file, converters= {'COLUMN': pd.to_datetime})
通常,读取excel工作表将使用excel工作表中定义的dtype,但是您不能指定dtype
read_csv,例如,例如。您可以提供一个
convertersarg,您可以为其传递列的字典和func来调用以转换列:
df1 = pd.read_excel(file, converters= {'COLUMN': pd.to_datetime})