Advertisement
jack06215

[Python] convert month to a season

Jun 13th, 2020
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.04 KB | None | 0 0
  1. [(month%12 + 3)//3 for month in range(1, 13)]
  2. (df['date'].dt.month%12 + 3)//3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement