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!
Questo esercizio fa parte del corso
ETL and ELT in Python
Istruzioni dell'esercizio
- Complete the
load()function by writing thetransformed_dataDataFrame to a.csvfile, usingfile_name. - Use the
transform()function to clean theextracted_dataDataFrame. - Load
transformed_datato thetransformed_data.csvfile using theload()function.
Esercizio pratico interattivo
Prova a risolvere questo esercizio completando il codice di esempio.
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")