My Excel file (.xlsb) had a date column that was in a datetime format. When I read that data file, the date column got converted to a float series (e.g., 44871.001644).
Now I want to convert it to date format, as it was in the Excel file before.
Below is the code I used
df = pd.read_excel('/Users/Docs1/Documents/Work/FRT/FRT-6_Nov-12_Nov,engine='pyxlsb',sheet_name ='Raw Dump')
I am using the following code to convert the float series to date-
df['Created date'] = pd.to_datetime(all_data['Created date'])
But it is returning be values like - 1970-01-01 00:00:00.000044871
Whereas I want the precise date!=
Are there any other parameters I can use in datetime function?
Unable to find a solution, I need help.
Asked
Active
Viewed 10 times
0

Adarsh Rai
- 13
- 5