1. Learn
  2. /
  3. Courses
  4. /
  5. ETL and ELT in Python

Connected

Exercise

Persisting data to files

Loading data to a final destination is one of the most important steps of a data pipeline. In this exercise, you'll use the transform() function shown below to transform product sales data before loading it to a .csv file. This will give downstream data consumers a better view into total sales across a range of products.

For this exercise, the sales data has been loaded and transformed, and is stored in the clean_sales_data DataFrame. The pandas package has been imported as pd, and the os library is also ready to use!

Instructions

100 XP
  • Update the load() function to write data to the provided path, without headers or an index column.
  • Check to make sure the file was loaded to the desired file path.
  • Call the function to load the transformed data to persistent storage.