In [1]:
import matplotlib.pyplot as plt
import pandas as pd
from pandas import DataFrame
import numpy as np
%matplotlib inline
In [2]:
#make random dataframe
df = DataFrame(np.random.randn(10, 4).cumsum(0),
columns=['A', 'B', 'C', 'D'],
index=np.arange(0, 100, 10)) #0 to 100, at intervals of 10
In [9]:
# turn a column into a sequence
s = df.ix[:,1] #sequence = dataframe 3rd column. index modifier?
type(s)
print s
In [4]:
df
Out[4]:
In [13]:
plt.figure() #http://matplotlib.org/api/figure_api.html customize the image
df.plot()
x=1
plt.title('Random')
plt.xlabel('Random X')
plt.ylabel('Random Y')
plt.xticks()
plt.show()
In [10]:
from pandas.tools.plotting import bootstrap_plot
bootstrap_plot(s, size=5, samples=10, color='blue')
Out[10]:
In [ ]: