Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

column string to datetime python

# convert the 'Date' column to datetime format
df['Date'] = df['Date'].astype('datetime64[ns]')
 
# Check the format of 'Date' column
df.info()
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #column #string #datetime #python
ADD COMMENT
Topic
Name
5+2 =