Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

changing dtype of multiple columns to_datetime

my_df[['column1','column2']] =     
my_df[['column1','column2']].apply(pd.to_datetime, format='%Y-%m-%d %H:%M:%S.%f')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #changing #dtype #multiple #columns
ADD COMMENT
Topic
Name
3+2 =