#!/usr/bin/env python
# coding: utf-8
# # Pandas Example
#
# This example shows how to treat basic data with pandas and how to visualise it (inspiration taken [here](http://pandas.pydata.org)).
# In[3]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib
matplotlib.style.use('ggplot')
get_ipython().run_line_magic('matplotlib', 'inline')
# In[4]:
ts = pd.Series(np.random.randn(1000), index=pd.date_range('1/1/2000', periods=1000))
ts = ts.cumsum()
ts
# In[5]:
ts.plot()
# In[7]:
df = pd.DataFrame(np.random.randn(1000, 4), index=ts.index, columns=list('ABCD'))
df = df.cumsum()
plt.figure(); df.plot();
# In[8]:
plt.figure()
df.ix[5].plot(kind='bar'); plt.axhline(0, color='k')