Get startedGet started for free

Building an ETL Pipeline

Ready to ratchet up the fun? In this exercise, you'll be responsible for building the rest of the load() function before running each step in the ETL process. The extract() and transform() functions have been defined for you. Good luck!

This exercise is part of the course

ETL and ELT in Python

View Course

Exercise instructions

  • Complete the load() function by writing the transformed_data DataFrame to a .csv file, using file_name.
  • Use the transform() function to clean the extracted_data DataFrame.
  • Load transformed_data to the transformed_data.csv file using the load() function.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

def load(data_frame, file_name):
  # Write cleaned_data to a CSV using file_name
  data_frame.____(____)
  print(f"Successfully loaded data to {file_name}")

extracted_data = extract(file_name="raw_data.csv")

# Transform extracted_data using transform() function
transformed_data = ____(data_frame=____)

# Load transformed_data to the file transformed_data.csv
____(data_frame=____, file_name="transformed_data.csv")
Edit and Run Code