import pandas as pd
def get_first_rows(df):
return df.head(3)
print(get_first_rows(create_df({'Name': ['Tom', 'Jack', 'Steve', 'Ricky'],'Age': [28, 34, 29, 42]}, index=['rank1', 'rank2', 'rank3', 'rank4'])))
print(get_first_rows(create_df({'Country': ['USA', 'Canada', 'Germany', 'UK'],'Population': [328, 37, 83, 66]}, index=['rank1', 'rank2', 'rank3', 'rank4'])))