I have this python function to get financial data from some tickers
JavaScript
x
5
1
def get_quandl_data_df(ticker, start, end, api_key):
2
import quandl
3
4
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)
5
Then
JavaScript
1
3
1
# len(tickers_sp500) = 500
2
data = get_quandl_data_df(tickers_sp500,'2017-01-01','2018-01-01','xxxxxxxxxx')
3
So the number of rows of my DataFrame should be around 100k rows. But data.info() is returning: (just 10k rows)
JavaScript
1
13
13
1
<class 'pandas.core.frame.DataFrame'>
2
RangeIndex: 10000 entries, 0 to 9999
3
Data columns (total 7 columns):
4
ticker 10000 non-null object
5
date 10000 non-null datetime64[ns]
6
open 10000 non-null float64
7
high 10000 non-null float64
8
low 10000 non-null float64
9
close 10000 non-null float64
10
volume 10000 non-null float64
11
dtypes: datetime64[ns](1), float64(5), object(1)
12
memory usage: 547.0+ KB
13
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.
JavaScript
1
2
1
get_quandl_data_df(ticker, start, end, api_key,paginate=True):
2