I am getting a parse error while trying to extract the year from the Registration date column where data is in format dd/mm/yy hh:mm: ss.
Asked
Active
Viewed 206 times
0
-
Please provide enough code so others can better understand or reproduce the problem. – Community Jul 13 '22 at 03:02
-
For a .csv file when I am performing pd.DatetimeIndex(df['Registration Date']).year I was getting the above mentioned error. However pd.DatetimeIndex(df['Registration Date']).year worked for xlsx file. But I want to understand why this didn't work for .csv file – Aish Jul 13 '22 at 15:49
-
Does this answer your question? [Convert Excel style date with pandas](https://stackoverflow.com/questions/38454403/convert-excel-style-date-with-pandas) – FObersteiner Jul 14 '22 at 10:11