Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Create a Sales Trend Chart | Automating Reports and Visual Insights
Python Automation for Reports and Visual Insights
Section 1. Chapitre 18
single

single

bookChallenge: Create a Sales Trend Chart

Glissez pour afficher le menu

Tâche

Glissez pour commencer à coder

Given a DataFrame containing sales data over time, create a function that generates a line chart of sales trends using matplotlib and saves the chart as a PNG file.

  • Use the date_col as the x-axis and sales_col as the y-axis in the line chart.
  • Set the chart title to the value of title.
  • Label the x-axis as "Date" and the y-axis as "Sales".
  • Add grid lines to the chart.
  • Save the chart as a PNG image to the path specified by output_path.

Solution

Switch to desktopPassez à un bureau pour une pratique réelleContinuez d'où vous êtes en utilisant l'une des options ci-dessous
Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 1. Chapitre 18
single

single

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

some-alt