[Python] Token caching when using Pandas to read files from Azure Storage

Discussão em 'Python' iniciado por Stack, Fevereiro 1, 2025.

  1. Stack

    Stack Membro Participativo

    I can read files from Azure Storage into Pandas like this

    import pandas as pd
    from azure.identity import AzureCliCredential

    credential = AzureCliCredential()
    pd.read_csv(
    "abfs://my_container/my_file.csv",
    storage_options={'account_name': 'my_account', 'credential': credential}
    )


    Getting the token from AzureCliCredential is slow. Is there a way to make pandas/fsspec cache the token so that the slow token retrieval process is not repeated over and over again when I open many files?

    Continue reading...

Compartilhe esta Página