Page 52 - IPP-12-2025
P. 52

plt.xlabel("Index")

                               plt.ylabel("Values")

                               plt.show()
                           elif ch7 == 3:

                               n = int(input("Enter number of rows to plot: "))

                               df = dfair.head(n)

                               df.plot(kind="barh")

                               plt.title("Horizontal Bar Plot")
                               plt.xlabel("Values")

                               plt.ylabel("Index")

                               plt.show()

                           elif ch7 == 4:

                               dfair.plot(kind="hist")

                               plt.title("Histogram")
                               plt.show()

                           elif ch7 == 5:

                               break

                   elif ch == 8:

                       print("Exiting the program.")
                       break
   47   48   49   50   51   52   53   54   55   56   57