Skip to content

Description:

  • Work with data in dask for local, cluster and remote data IO.

Resources:

This notebook reads its settings from environment variables. Set them before starting Jupyter:

  • S3_BUCKET: name of an S3 bucket you can access

Upload a CSV file to example/data.csv and a Parquet file to example/data.parquet in that bucket, or change the keys in the cells. AWS credentials come from the standard AWS configuration (environment variables, ~/.aws, or an instance role).

Read csv data into a dask dataframe from s3

import os
import dask.dataframe as dd
df = dd.read_csv(f"s3://{os.environ['S3_BUCKET']}/example/data.csv")
df.head()

Read parquet data into a dask dataframe from S3

import os
import dask.dataframe as dd
df = dd.read_parquet(f"s3://{os.environ['S3_BUCKET']}/example/data.parquet")
df.head()

ganymede is made by Eugo