Skip to content

Instantly share code, notes, and snippets.

@geojackass
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geojackass/f732f51c36c80e769cc8 to your computer and use it in GitHub Desktop.
Save geojackass/f732f51c36c80e769cc8 to your computer and use it in GitHub Desktop.
stock_draw
import pandas as pd
import matplotlib.pyplot as plt
close_px_all = pd.read_csv('stock_px.csv', parse_dates=True, index_col=0)
close_px = close_px_all[["AAPL", "MSFT", "XOM", "SPX"]]
close_px = close_px.resample("B", fill_method="ffill")
close_px.plot()
plt.legend(loc = 2)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment