quandl / quandl-python

MIT License
1.38k stars 338 forks source link

Possible Pandas Initialization Problem #4

Closed matthewgilbert closed 11 years ago

matthewgilbert commented 11 years ago

If I download data using this Quandl.get() method and then subsequently plot the data the date range is inverted. This does not happen if I initialize a pandas.core.series.TimeSeries myself.

%pylab inline
import Quandl
import pandas as pd

tsx = Quandl.get("YAHOO/INDEX_GSPTSE")
print type(tsx['Open'])
print tsx['Open']
tsx['Open'].plot()

ds = pd.date_range(start='2012-01-01', periods=100)[::-1]
x = pd.Series(range(100), index=ds)
print type(x)
x.head()
x.plot()
ChrisStevens commented 11 years ago

Fixed in previous commit.