I am trying to get and month from the column which is integer format
'''dvd['yy'] = str(dvd['CalendarYearMonth'])[:3]
dvd['mon'] = str(dvd['CalendarYearMonth'])[4:6]'''
but getting following output
CalendarYearMonth CountryCode Dividends yy mon
0 202108 CN 196.0 0 2
1 202109 CN 380.0 0 2
2 202108 IN NaN 0 2
3 202109 IN 115.0 0 2
could anyone help me to get the correct output- dvd is the input DF