Command
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
View first 10 rows
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
View first 10 rows