【python】 에너지 데이터를 인터랙티브하게 시각화하는 간단한 방법 【plotly.express】
2853 단어 plotlyJupyter-notebook파이썬에너지 데이터

개요
입력 데이터

소스 코드
# ライブラリのインポート
import pandas as pd
import plotly.express as px
# sampleデータの読み込み
data = pd.read_csv('./sample.csv',encoding='shift-jis',index_col=[0],parse_dates=[0])
# データのリサンプリング(1日毎の合計)
data_month_sum = data.resample('D').sum()
# 線グラフの描画
px.line(data_frame=data_month_sum,
x=data_month_sum.index,
y='電力量',
color_discrete_sequence=['yellow'])
실행 결과

요약
# ライブラリのインポート
import pandas as pd
import plotly.express as px
# sampleデータの読み込み
data = pd.read_csv('./sample.csv',encoding='shift-jis',index_col=[0],parse_dates=[0])
# データのリサンプリング(1日毎の合計)
data_month_sum = data.resample('D').sum()
# 線グラフの描画
px.line(data_frame=data_month_sum,
x=data_month_sum.index,
y='電力量',
color_discrete_sequence=['yellow'])

요약
Reference
이 문제에 관하여(【python】 에너지 데이터를 인터랙티브하게 시각화하는 간단한 방법 【plotly.express】), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/snuow/items/93d2ee487e6a33ec9498텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)