import pandas as pd
df=pd.DataFrame(pokemons)
print(df)
df.head()
df.head(3)
Why does it prints only df.head(3) and not df.head()?
import pandas as pd
df=pd.DataFrame(pokemons)
print(df)
df.head()
df.head(3)
Why does it prints only df.head(3) and not df.head()?
Hey @aditrisriv, in jupyter notebook, if you don’t add print() to any command then you will be able to see the output only for the last line. Same is in this case where you were able to see output for df.head(3) but not df.head().
If you want to see output for df.head() also, then add print() statement.
print(df.head())
df.head(3) or print(df.head(3))
Hope this resolved your doubt.