Sectie 1. Hoofdstuk 18
single
Challenge: Create a Sales Trend Chart
Veeg om het menu te tonen
Taak
Veeg om te beginnen met coderen
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_colas the x-axis andsales_colas 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.
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 1. Hoofdstuk 18
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.