驗證資料轉換
到目前為止做得很好!手動抽查轉換結果,是確保你在整個 pipeline 中維持資料品質的第一步。pandas 提供了多個內建函式,正好能幫上這個忙!
為了幫你開始這個練習,已經將 pandas 匯入為 pd。
本練習屬於課程
使用 Python 的 ETL 與 ELT
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
def extract(file_path):
# Ingest the data to a DataFrame
raw_data = pd.____(____)
# Return the DataFrame
return raw_data
raw_sales_data = extract("sales_data.parquet")