Page 48 - IPP-12-2025
P. 48
elif ch2 == 2:
print(dfair.columns)
elif ch2 == 3:
print(dfair.index)
elif ch2 == 4:
print(dfair.shape)
elif ch2 == 5:
print(dfair.ndim)
elif ch2 == 6:
print(dfair.dtypes)
elif ch2 == 7:
print(dfair.size)
elif ch2 == 8:
break
elif ch == 3:
while True:
print("Display Records Menu")
print("1. Top 5 Records")
print("2. Bottom 5 Records")
print("3. Specific number of records from the top")
print("4. Specific number of records from the bottom")
print("5. Exit")
ch3 = int(input("Enter choice: "))
if ch3 == 1:
print(dfair.head())
elif ch3 == 2:
print(dfair.tail())
elif ch3 == 3:
n = int(input("Enter how many records you want to display from
the top: "))
print(dfair.head(n))