Skip to content

Instantly share code, notes, and snippets.

@rohitrajiit
Created June 2, 2020 09:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rohitrajiit/bccdc9ee964065217256cc0a639e2433 to your computer and use it in GitHub Desktop.
Save rohitrajiit/bccdc9ee964065217256cc0a639e2433 to your computer and use it in GitHub Desktop.
data['Dates']= pandas.to_datetime(data['Dates'], format = '%d/%m/%Y')
data.loc[data['positive']=='','positive'] = None
data['positive'] =data['positive'].fillna(method='ffill')
data['positive'] = data['positive'].astype(int)
data.loc[data['totaltested']=='','totaltested'] = None
data['totaltested'] =data['totaltested'].fillna(method='ffill')
data['totaltested'] = data['totaltested'].astype(int)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment