I'm trying to read multiple CSV files from blob storage using python.
The code that I'm using is:
blob_service_client = BlobServiceClient.from_connection_string(connection_str)
container_client = blob_service_client.get_container_client(container)
blobs_list = container_client.list_blobs(folder_root)
for blob in blobs_list:
blob_client = blob_service_client.get_blob_client(container=container, blob="blob.name")
stream = blob_client.download_blob().content_as_text()
I'm not sure what is the correct way to store the CSV files read in a pandas dataframe.
I tried to use:
df = df.append(pd.read_csv(StringIO(stream)))
But this shows me an error.
Any idea how can I to do this?