LoginSignup
0
2

More than 3 years have passed since last update.

python 勉強 plot

Last updated at Posted at 2019-09-27

plotの勉強

pivotの勉強の際に作成したpythonでplotをしてみる。
データの可視化への試みです。
ざっくりしています。。。


import numpy as np
import pandas as pd

df = pd.read_csv(r'インプットファイル', index_col=0).drop(['日時','企業名','支払','返金'], axis=1)

df["日時"] = df["日時"].str.split(":").str[0]
print(c_nitiji)
data = pd.pivot_table(df, index='日時',  columns='種別',  values='金額', aggfunc=[sum])

data2 = data.fillna(0)

fig, ax = plt.subplots()
ax.plot(data2)
plt.savefig(r"アウトプット")

以下の図ができた。
みづらい。。。
もうちょっと改良予定。

image.png

0
2
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2