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

# Pandas

> Pandas: A Python package that provides fast, flexible, and expressive data structures designed to make working with “relational” or “labeled” data both easy…

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

Description:
- A Python package that provides fast, flexible, and expressive data structures designed to make working with "relational" or "labeled" data both easy and intuitive.

Resources:
- [GitHub] https://github.com/pandas-dev/pandas
- [Docs] https://pandas.pydata.org/pandas-docs/stable/

## Example 1

Create a dataframe

```python
import pandas as pd

df = pd.DataFrame(
    {
        "Name": [
            "Braund, Mr. Owen Harris",
            "Allen, Mr. William Henry",
            "Bonnell, Miss. Elizabeth",
        ],
        "Age": [22, 35, 58],
        "Sex": ["male", "male", "female"],
    }
)

df
```

## Example 2

Download a remote csv asynchronously and create a dataframe from it

```python
import pandas as pd
from fsspec import filesystem
from pathlib import Path
import asyncio

tmp = "/tmp/demo_notebooks"
Path(tmp).mkdir(exist_ok=True)

url = "https://raw.githubusercontent.com/pandas-dev/pandas/main/doc/data/titanic.csv"

async def download_csv():
    fs = filesystem("http", asynchronous=True)
    session = await fs.set_session()
    out = await fs._get(url, f"{tmp}/titanic.csv")
    await session.close()

asyncio.run(download_csv())

titanic = pd.read_csv(f"{tmp}/titanic.csv")
titanic.head()
```
