Answers for "pandas function to convert a date column to integer"

15

convert column in pandas to datetime

df['col'] = pd.to_datetime(df['col'])
Posted by: Guest on April-16-2020
0

datetime to int in pandas

df['time'] = df['time'].apply(lambda x: x.value)
Posted by: Guest on June-25-2021

Code answers related to "pandas function to convert a date column to integer"

Python Answers by Framework

Browse Popular Code Answers by Language