If you look at the documentation HERE, it shows how to use a sas url to create a BlobClient. Once you have this, you can follow the instruction in the LINK you shared.
Your final code will look like this.
from azure.storage.blob import BlobClient
import pandas as pd
from io import StringIO
sas_url = "<your_blob_sas url>"
blob_client = BlobClient.from_blob_url(sas_url)
blob_data = blob_client.download_blob()
df = pd.read_csv(StringIO(blob_data.content_as_text()))
print(df)
To upload a dataframe to a container, you can try the following code
from azure.storage.blob import ContainerClient
sas_url = "https://<acct_name>.blob.core.windows.net/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
container = ContainerClient.from_container_url(sas_url)
output = io.StringIO()
head = ["col1" , "col2" , "col3"]
l = [[1 , 2 , 3],[4,5,6] , [8 , 7 , 9]]
df = pd.DataFrame (l , columns = head)
print(df)
output = df.to_csv (index_label="idx", encoding = "utf-8")
blob_client = container_client.upload_blob(name="myblob", data=output)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…