Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

converting a panda column to a datetime()

df = pd.DataFrame({'year': [2015, 2016],
                   'month': [2, 3],
                   'day': [4, 5]})
pd.to_datetime(df)
0   2015-02-04
1   2016-03-05
dtype: datetime64[ns]
Source by pandas.pydata.org #
 
PREVIOUS NEXT
Tagged: #converting #panda #column
ADD COMMENT
Topic
Name
7+4 =