Skip to content

Instantly share code, notes, and snippets.

@exy02
Created September 25, 2020 05:42
Show Gist options
  • Save exy02/5e9f6dbbb5e258f694e8b1b249cd818d to your computer and use it in GitHub Desktop.
Save exy02/5e9f6dbbb5e258f694e8b1b249cd818d to your computer and use it in GitHub Desktop.
How to Extract Data from Online Data Visualizations - 2. Data Cleaning _3
json_df[json_df.columns] = json_df[json_df.columns].replace({'"':'',']':'','}':''},regex=True)
for col_name in col_names:
json_df[col_name] = json_df[col_name].str.split(":",expand=True)[1]
json_df = json_df.sort_values(by=['Test Date','Measure','County'], ascending=[False,False,True])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment