pandas绘图

#encoding:utf8
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
df = pd.DataFrame(np.random.randn(10,4),index=pd.date_range('2018/12/18',
periods=10), columns=list('ABCD'))
plt.figure()
df.plot()
df = pd.DataFrame(3 * np.random.rand(4), index=['a', 'b', 'c', 'd'], columns=['x'])
df.plot.pie(subplots=True)
plt.show()
#或者
#encoding:utf8
import pandas as pd
import numpy as np
from pylab import *
df = pd.DataFrame(np.random.randn(10,4),index=pd.date_range('2018/12/18',
periods=10), columns=list('ABCD'))
df.plot()
df = pd.DataFrame(3 * np.random.rand(4), index=['a', 'b', 'c', 'd'], columns=['x'])
df.plot.pie(subplots=True)
show()

pandas绘图

pandas绘图

上一篇:启动 XPs 代理


下一篇:hdu 5996 dingyeye loves stone(博弈)