You can specify the number of lines to display in the head command by using the -n option followed by the number of lines you want. For example, to display the first 5 lines of a file, you would use:
head -n 5 filename.txt
If you want to display a specific number of lines from a DataFrame in Python, you can use the head() method with a parameter. For example, to get the first 3 rows of a DataFrame df, you would use:
print(df.head(n=3))
This allows you to customize the output according to your needs.
