The data type after reading Excel with pandas.read_excel
seems to be affected by the formatting in Excel, so I was a little worried, so I experimented. Accumulate little by little.
--Environment --macOS Catalina version 10.15.7 --Microsoft Excel for Mac version 16.42 - Python 3.8.5 - pandas 1.1.3
Excel format(Classification) | Excel format(display) | Type after loading with pandas |
---|---|---|
standard | 43831 | int |
date | 2020/1/2 | datetime.datetime |
date | Friday, January 3, 2020 | datetime.datetime |
date | 2020-01-04 | pandas.Timestamp |
date | January 5, 2020 | pandas.Timestamp |
date | January 2020 | pandas.Timestamp |
date | January 7 | pandas.Timestamp |
date | 2020/1/8 | pandas.Timestamp |
date | 2020/1/9 12:00 AM | pandas.Timestamp |
date | 2020/1/10 0:00 | pandas.Timestamp |
date | 1/11 | pandas.Timestamp |
date | 1/12/20 | pandas.Timestamp |
date | 01/13/20 | pandas.Timestamp |
date | 14-Jan | pandas.Timestamp |
date | 15-Jan-20 | pandas.Timestamp |
date | 16-Jan-20 | pandas.Timestamp |
date | Jan-20 | pandas.Timestamp |
date | January-20 | pandas.Timestamp |
date | J | pandas.Timestamp |
date | J-20 | pandas.Timestamp |
Recommended Posts