# import pandas library import pandas as pd import matplotlib.pyplot as plt # create pandas DataFrame df = pd.DataFrame({'team': ['India', 'South Africa', 'New Zealand', 'England'], 'points': ['10', '8', '3', '5'], 'runrate': ['0.5', '1.4', '2', '-0.6'], 'wins': ['5', '4', '2', '2']}) # print the data frame print(df) df[['points', 'runrate', 'wins']].plot() plt.show()
Here is what the above code is Doing:
1. We created a DataFrame named df.
2. We printed the DataFrame.
3. We created a plot of the columns points, runrate, and wins.
4. We displayed the plot.