Skip to content

Instantly share code, notes, and snippets.

@thehappycheese
Created November 2, 2022 06:13
Show Gist options
  • Save thehappycheese/6deb81dbbde2b8f359ebbc8e27aa19f8 to your computer and use it in GitHub Desktop.
Save thehappycheese/6deb81dbbde2b8f359ebbc8e27aa19f8 to your computer and use it in GitHub Desktop.
Use pandas to read azure cloud storage
import pandas as pd
from azure.identity.aio import DefaultAzureCredential
CONTAINER = "..."
STORAGE_ACCOUNT_NAME = "..."
pd.read_parquet(
path = f"abfss://{CONTAINER}@{STORAGE_ACCOUNT_NAME}.dfs.core.windows.net/some/path/example.parquet",
storage_options = {"credential":DefaultAzureCredential()}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment