import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
ts = pd.Series(np.random.randn(1000), index=pd.date_range('1/1/2000', periods=1000));
ts = ts.cumsum ();
ts.plot ();
df = pd.DataFrame (np.random.randn(1000, 4), index=ts.index, columns=['A', 'B', 'C', 'D']);
df = df.cumsum ();
plt.figure();
df.plot();
plt.legend (loc='best');
plt.show();
pandas-test
最新推荐文章于 2025-04-21 14:00:00 发布