I read a csv file containing 150,000 lines into a pandas dataframe. This dataframe has a field, Date, with the dates in yyyy-mm-dd format. I want t
Date
yyyy-mm-dd
I use below code which works very well for me
df['Year']=[d.split('-')[0] for d in df.Date] df['Month']=[d.split('-')[1] for d in df.Date] df['Day']=[d.split('-')[2] for d in df.Date] df.head(5)