text_plain_output_1.png
import pandas as pd

url = 'https://data.boston.gov/api/3/action/datastore_search?resource_id=c13199bf-49a1-488d-b8e9-55e49523ef81&limit=90000'
js = pd.read_json(url)

df = pd.DataFrame(js['result']['records'])
df = df.set_index('timestamp')
df.columns = df.columns.str.lower()
df = df.drop(['_id'], axis=1)

df.index = df.index.astype('datetime64[ns]')
df.index = df.index - pd.tseries.offsets.Day()
df.index = pd.to_datetime(df.index.date)
df['usage'] = df['usage'].astype('int32')

df.info()