Skip to content
Advertisement

Increment the max rows of the pandas DataFrame

I have this python function to get financial data from some tickers

def get_quandl_data_df(ticker, start, end, api_key):
    import quandl
    
    return quandl.get_table('WIKI/PRICES', qopts={'columns':  ['ticker','date', 'open', 'high', 'low', 'close', 'volume']}, ticker = ticker, date = { 'gte': start, 'lte': end }, api_key=api_key)        

Then

# len(tickers_sp500) = 500
data = get_quandl_data_df(tickers_sp500,'2017-01-01','2018-01-01','xxxxxxxxxx')

So the number of rows of my DataFrame should be around 100k rows. But data.info() is returning: (just 10k rows)

<class 'pandas.core.frame.DataFrame'>
RangeIndex: 10000 entries, 0 to 9999
Data columns (total 7 columns):
ticker    10000 non-null object
date      10000 non-null datetime64[ns]
open      10000 non-null float64
high      10000 non-null float64
low       10000 non-null float64
close     10000 non-null float64
volume    10000 non-null float64
dtypes: datetime64[ns](1), float64(5), object(1)
memory usage: 547.0+ KB

How can I increment the max rows of the pandas DataFrame??

Advertisement

Answer

1)Appending the argument paginate=True will extend the limit to 1,000,000 rows.

get_quandl_data_df(ticker, start, end, api_key,paginate=True):
Advertisement