Command
df.head
Explanation
df.head() is used to view the first n rows of a DataFrame. By default, it shows the first 5 rows.
Examples
View first 5 rows
df.head()
View first 10 rows
df.head(10)
df.head
df.head() is used to view the first n rows of a DataFrame. By default, it shows the first 5 rows.
View first 5 rows
df.head()
View first 10 rows
df.head(10)