DataFrame.plot.line() method: | dataframe line plot
# DataFrame.plot.line() method #eg df['col'].plot.line() plt.xlabel("X axis label") plt.ylabel("Y axis label") plt.show()
Here is what the above code is Doing:
1. We’re calling the plot.line() method on the column ‘col’ of the DataFrame df.
2. We’re setting the x-axis label to “X axis label” using plt.xlabel().
3. We’re setting the y-axis label to “Y axis label” using plt.ylabel().
4. We’re displaying the plot using plt.show().