.head () the first 10 lines pandas code example Example 1: python - head df.head(10) df.tail(10) Example 2: pandas show top 10 rows df.head(10)