print first 10 rows of dataframe all columns code example Example: get only first 10 columns pandas df.iloc[:, : 50]