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

single

bookChallenge: Create a Sales Trend Chart

Swipe um das Menü anzuzeigen

Aufgabe

Wischen, um mit dem Codieren zu beginnen

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.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 1. Kapitel 18
single

single

Fragen Sie AI

expand

Fragen Sie AI

ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

some-alt