About Lesson
Line plots are ideal for visualizing trends over time.
# Line plot of Sales
df.plot(x='Month', y='Sales', kind='line', title='Monthly Sales', marker='o', color='blue')
plt.ylabel('Sales Amount')
plt.show()
Explanation:
x='Month'
: The x-axis uses the “Month” column.y='Sales'
: The y-axis uses the “Sales” column.kind='line'
: Specifies the plot type.