Skip to content

Instantly share code, notes, and snippets.

@kurasaiteja
Created July 28, 2020 08:24
Show Gist options
  • Save kurasaiteja/2add2f80fc4dc0d5dbe3a368f6a834d0 to your computer and use it in GitHub Desktop.
Save kurasaiteja/2add2f80fc4dc0d5dbe3a368f6a834d0 to your computer and use it in GitHub Desktop.
def dateconv(date):
q ="2020-03-22"
if date < q:
return "Pre-Lockdown"
else:
return "During-Lockdown"
df_india["Lockdown"] = df_india["date"].apply(dateconv)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment