code: def make_dataframe(result):
      
      import pandas as pd
      ret = {}
      if isinstance(result,dict):
          if 'timeseries' in result:
              result = result['timeseries']
      for uuid, data in result.items():
          df = pd.DataFrame(data)
          if len(df.columns) == 5: # statistical data
              df.columns = ['time','min','mean','max','count']
          else:
              df.columns = ['time','value']
          df['time'] = pd.to_datetime(df['time'],unit='ns')
          df = df.set_index(df.pop('time'))
          ret[uuid] = df
      return ret
docs: Turns the results of one of the data API calls into a pandas dataframe