Get first 3 rows of pandas DataFrame

Use the head() function to get the first 3 rows of the companies dataset and assign them to a variable named head.
import pandas as pd df = pd.read_csv('/data/companies.csv') # get first 3 rows of df
head =
print(head)
Python
Setting up Python environment...
Output