I have this pandas dataframe including a column for months whose type is int64, and I want to change every value in the column to be the corresponding season of the year.
For example if x is any of 12, 1, or 2, change the value of x to 'winter', etc.
I have tried some for loops but no use. I think there is a one liner that can do this using lambda x.
I supposed that every month has only 1 season so for example winter is in months 12, 1, and 2, and so on.
For example (0, 1, and 2 are indices):
input:
0 1
1 3
2 6
output:
0 winter
1 spring
2 summer
My problem is with month 12 or else I could have used bins.
Any ideas?

