#Library import
import pandas as pd
import plotly.express as px
#Reading sample data
data = pd.read_csv('./sample.csv',encoding='shift-jis',index_col=[0],parse_dates=[0])
#Data resampling (daily total)
data_month_sum = data.resample('D').sum()
#Line graph drawing
px.line(data_frame=data_month_sum,
x=data_month_sum.index,
y='Electric energy',
color_discrete_sequence=['yellow'])
Recommended Posts