Run
import pandas as pd #initialize a dataframe df = pd.DataFrame( [[21, 72, 67], [23, 78, 62], [32, 74, 56], [73, 88, 67], [32, 74, 56], [43, 78, 69], [32, 74, 54], [52, 54, 76]], columns=['a', 'b', 'c']) #get first default number of rows df1 = df.head() #print the dataframe print(df1)
Output