> Every page of the ganymede website is listed in https://eugo.io/docs/ganymede/llms.txt.

# DaskFs

> DaskFs: Work with data in dask for local, cluster and remote data IO. A Python demo notebook from ganymede.

Web page: https://eugo.io/docs/ganymede/demo_notebooks/data_storage/filesystems/dask/
Notebook: https://eugo.io/docs/ganymede/demo_notebooks/data_storage/filesystems/dask/dask.ipynb (source: https://github.com/eugo-inc/ganymede/blob/main/demo_notebooks/data_storage/filesystems/dask.ipynb)

Description:
- Work with data in dask for local, cluster and remote data IO.

Resources:
- [Dask Docs] https://docs.dask.org/en/stable/how-to/connect-to-remote-data.html

## Environment variables

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).

## Example 1

Read csv data into a dask dataframe from s3

```python
import os

import dask.dataframe as dd

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

## Example 2

Read parquet data into a dask dataframe from S3

```python
import os

import dask.dataframe as dd

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