Skip to content

Instantly share code, notes, and snippets.

@azimut
Last active August 29, 2015 14:05
Show Gist options
  • Save azimut/5264ae0105cd4f479fb8 to your computer and use it in GitHub Desktop.
Save azimut/5264ae0105cd4f479fb8 to your computer and use it in GitHub Desktop.
kata - python data analysis
import sys
import pandas as pd
import matplotlib.pylab as plt
pd.options.display.mpl_style = 'default'
mpl_stylesheet = {'interactive':False}
plt.rcParams.update(mpl_stylesheet)
df = pd.read_csv( 'gold.csv')
df.date = pd.to_datetime(df.date, format='%d/%M/%Y')
df.set_index('date',inplace=True)
df[sys.argv[1]:sys.argv[2]].price.plot(label='price', title='gold price over time')
plt.legend(loc='best')
plt.show()
@azimut
Copy link
Author

azimut commented Aug 24, 2014

Es mucho mas interesante de lo que pensaba el libro1. Gracias!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment