Created
July 28, 2020 08:26
-
-
Save kurasaiteja/7e8f0c5a62c915c078d79c07a277db2a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def datephase(date): | |
| if date < "2020-03-22": | |
| return "Pre Lockdown" | |
| elif date < "2020-04-15": | |
| return "Lockdown Phase 1" | |
| elif date < "2020-05-04": | |
| return "Lockdown Phase 2" | |
| elif date < "2020-05-18": | |
| return "Lockdown Phase 3" | |
| elif date < "2020-06-01": | |
| return "Lockdown Phase 4" | |
| elif date < "2020-07-01": | |
| return "Unlock Phase 1" | |
| else: | |
| return "Unlock Phase 2" | |
| df_india["LockdownPhase"] = df_india["date"].apply(datephase) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment