I tried the example in the following link: Write Python DataFrame as CSV into Azure Blob But BlockBlobService is no longer available in azure.storage.blob, so I tried using BlockBlobClient and I can create, delete containers using the following code. However I can't find a way to create a blob in the container and write the records from a data frame into it as mentioned in the above link. Please help I want to create a blob and write the records from the dataframe into it.
from azure.storage.blob import BlobServiceClient
blobService = BlobServiceClient.from_connection_string("**")
#blobService = BlobServiceClient(account_name=accountName, account_key=accountKey)
try:
new_container = blobService.create_container("containerfromblobservice")
properties = new_container.get_container_properties()
except ResourceExistsError:
print("Container already exists.")
