EX Exercises

✨ Simple Visualization Practice Tasks

These tasks are designed to help you practice simple data visualization in Python using Matplotlib. You will use a CSV file as a data source, load it into a DataFrame, and create different plots. The total estimated time for all tasks is about 20 minutes.


🔥 Task 1: Plot a single product line

  1. Download the provided CSV file (data.csv) or load it directly read_csv(url) from the URL: https://geomoer.github.io/moer-base-python/assets/tests/unit08/data.csv using pandas.
  2. Create a line plot that shows the revenue of Product A over the years(X-Axis).
  3. Add a descriptive title to your plot (e.g., “Revenue of Product A over Time”).
  4. Label the x-axis as “Year” and the y-axis as “Revenue in USD”.
  5. Use a solid line style (e.g., linestyle=’-‘) so that the line appears as “—-“.
  6. Add different markers to your line using marker(see the table on https://geomoer.github.io/moer-base-python/unit08/unit08-04_creating.html.

Updated: