1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Data Pipelines

Exercise

Loading sales data to a CSV file

Loading data is an essential component of any data pipeline. It ensures that any data consumers and processes have reliable access to data that you've extracted and transformed earlier in a pipeline. In this exercise, you'll practice loading transformed sales data to a CSV file using pandas, which has been imported as pd. In addition to this, the raw data has been extracted and is available in the DataFrame raw_sales_data.

Instructions

100 XP
  • Filter the raw_sales_data DataFrame to only keep all items with a price less than 25 dollars.
  • Update the load() function to write the transformed sales data to a file named "transformed_sales_data.csv", making sure not include the index column.
  • Call the load() function on the cleaned Data Frame.