-1

Sorry noobie here, is there a reason why the row shown is only limited to 5? Thank you in advance

import pandas as pd
import quandl
df = pd.DataFrame(quandl.get('WIKI/TSLA'))
print(df.head())

enter image description here

camille
  • 16,432
  • 18
  • 38
  • 60
kaweng88
  • 3
  • 2
  • This isn't related to Quandl, it's just that you printed only the head of the data frame. Were you intending to do something else instead? – camille Feb 22 '21 at 16:36
  • hey Camille thanks for your reply! im just exploring on extraction of financial data from Quandl (sorry very new on this!) . would you recommend the premium data package? – kaweng88 Feb 23 '21 at 01:47
  • I have no idea, but the issue of printing only 5 rows is that you called `.head()`, which is to print on the top few rows. That would be the same regardless of the source of your data frame – camille Feb 23 '21 at 02:16

1 Answers1

1

by default head() method shows top 5 rows so if you want to see more rows,then pass the number of rows in n parameter of head() method

i.e

import pandas as pd
import quandl
df = pd.DataFrame(quandl.get('WIKI/TSLA')) 
print(df.head(n=10))

now it will show you top 10 rows

Anurag Dabas
  • 23,866
  • 9
  • 21
  • 41