Home > other >  Python date data format
Python date data format

Time:09-23

XLS file date column data type is object, form and date (date) (month) (year) and the form of the sun in two kinds of hybrid, how to deal with inconsistent date column now??

Have a great god help me solve??

CodePudding user response:

If you can be sure is the type of date, even if there are two forms: (date) (month) (year) and lunisolar year
What does it matter? If you can handle a, also can't deal with the fear of another?
Big deal more than a treatment!

CodePudding user response:

I am now the info is object type, so I'm meng

CodePudding user response:

You can add parameters, while reading excel file will

Pd. Read_excel (' XXX. XLS)
To:
Pd. Read_excel (' XXX. XLS 'dtype={' your date column name ': np. Datetime64})


Try!!!!!

CodePudding user response:

Can also be used to read first, reoccupy when the column value. Astype () conversion, don't know the post can send files, files fastest solution

CodePudding user response:

I separate the file handle,
Source of data preprocessing to have excuse me?????? Thank you for
  • Related