Skip to content

Instantly share code, notes, and snippets.

@bkaankuguoglu
Created March 15, 2021 21:41
Show Gist options
  • Save bkaankuguoglu/9099df3856b2f7a46f8c5c6512a02553 to your computer and use it in GitHub Desktop.
Save bkaankuguoglu/9099df3856b2f7a46f8c5c6512a02553 to your computer and use it in GitHub Desktop.
import pandas as pd
df = pd.read_csv('<YOUR_FILE_DIR>/PJME_hourly.csv')
df = df.set_index(['Datetime'])
df.index = pd.to_datetime(df.index)
if not df.index.is_monotonic:
df = df.sort_index()
df = df.rename(columns={'PJME_MW': 'value'})
plot_dataset(df, title='PJM East (PJME) Region: estimated energy consumption in Megawatts (MW)')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment