code: def pandasdfsummarytojson(df, ndigits=3):
      
      df = df.transpose()
      return {k: _pandassummarytojson(v, ndigits) for k, v in df.iterrows()}
docs: Convert the result of a
  
      Parameters
      ----------
      df : The result of a Pandas describe operation.
      ndigits : int, optional - The number of significant digits to round to.
  
      Returns
      -------
      A json object which captures the describe.  Keys are field names and
      values are dictionaries with all of the indexes returned by the Pandas
      describe.