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:
Example 1
Section titled “Example 1”Create a dataframe
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"], })
dfExample 2
Section titled “Example 2”Download a remote csv asynchronously and create a dataframe from it
import pandas as pdfrom fsspec import filesystemfrom pathlib import Pathimport 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()ganymede is made by Eugo