pandas parse_dates to date not datetime code example
Example 1: date parser python pandas
import pandas as pd
values = {'dates': ['20190902093000','20190913093000','20190921200000'],
'status': ['Opened','Opened','Closed']
}
df = pd.DataFrame(values, columns = ['dates','status'])
df['dates'] = pd.to_datetime(df['dates'], format='%Y%m%d%H%M%S')
print (df)
print (df.dtypes)
Example 2: date parser python pandas
format='%d%m%Y'