Skip to main content
When your flow needs data from a CSV file, you can bundle the file with the flow using IncludeFile. The file’s contents become available to every step, locally and on remote compute. This page shows how to read a CSV into a flow, transform the data, and store the result as a flow artifact you can access later from any script or notebook.
1

Acquire the CSV

This example uses a CSV from the Metaflow tutorials, downloaded by the save_data_locally function defined outside of the flow.
2

Run the flow

This flow shows how to:
  • Include a CSV saved locally for all steps in the flow.
  • Add a feature to each data point.
  • Save the new data as a flow artifact.
load_csv_data.py
3

Access artifacts outside of the flow

Run the following in any script or notebook to access the contents of the dataframe that was stored as a flow artifact with self.new_df: