Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

date parser python pandas

import pandas as pd

values = {'dates':  ['02-Sep-2019','13-Sep-2019','21-Sep-2019'],
          'status': ['Opened','Opened','Closed']
          }

df = pd.DataFrame(values, columns = ['dates','status'])

df['dates'] = pd.to_datetime(df['dates'], format='%d-%b-%Y')

print (df)
print (df.dtypes)
Source by datatofish.com #
 
PREVIOUS NEXT
Tagged: #date #parser #python #pandas
ADD COMMENT
Topic
Name
2+9 =