I have date column and I need to add month column in 'mmm-yy' Format in pandas
For eg.
Date Month 01/08/2022 Aug-22
I have date column and I need to add month column in 'mmm-yy' Format in pandas
For eg.
Date Month 01/08/2022 Aug-22
Hello @vishal Valanju ,
please create a month wise dictionary like this,
dict = {'date': {
0: '28-01-2022 5:25:00 PM',
1: '27-02-2022 6:25:00 PM',
2: '30-03-2022 7:25:00 PM',
3: '29-04-2022 8:25:00 PM',
4: '31-05-2022 9:25:00 PM'
},
'date_short': {0: 'Jan-2022', 1: 'Feb-2022', 2: 'Mar-2022', 3: 'Apr-2022', 4: 'May-2022'}}
df = pd.DataFrame(dict)
Happy Coding...!!