I'm trying to convert the CSV file which is there in the azure storage container to EXCEL and place it in the same container.
I'm able to read the data from a CSV file with the below code and am not able to convert it into excel and upload it into the container.
from io import StringIO
from azure.storage.blob import BlobServiceClient, ContainerClient, BlobClient
from typing import Container
import pandas as pd
conn_str = "DefaultEndpointsProtocol=https;AccountName="";AccountKey="";EndpointSuffix="""
container = "testing"
blob_name = "Test.csv"
filename = "test.xlsx"
container_client = ContainerClient.from_connection_string(
conn_str=conn_str,
container_name=container
)
downloaded_blob = container_client.download_blob(blob_name)
read_file = pd.read_csv(StringIO(downloaded_blob.content_as_text()) )
print(read_file)
Any suggestions on how can I achieve this?