Skip to content

Instantly share code, notes, and snippets.

@sid88in
Created April 11, 2016 20:40
Show Gist options
  • Save sid88in/04a6a53f9e98139046dd4ce2024b3d6d to your computer and use it in GitHub Desktop.
Save sid88in/04a6a53f9e98139046dd4ce2024b3d6d to your computer and use it in GitHub Desktop.
BaseViz:
def get_json_data(self):
return json.dumps([])
TableViz:
def get_json_data(self):
df = self.get_df()
print("This is happening")
return json.dumps(dict(records=df.to_dict(orient="records"),columns=list(df.columns),),default=utils.json_iso_dttm_ser,)
def get_data(self):
# This still needs to return json.loads
self.get_json_data()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment