How best to convert from azure blob csv format to pandas dataframe while running notebook in azure ml

前端 未结 4 1979
闹比i
闹比i 2020-12-10 14:56

I have a number of large csv (tab delimited) data stored as azure blobs, and I want to create a pandas dataframe from these. I can do this locally as follows:



        
4条回答
  •  余生分开走
    2020-12-10 15:18

    I think you want to use get_blob_to_bytes, or get_blob_to_text; these should output a string which you can use to create a dataframe as

    from io import StringIO
    blobstring = blob_service.get_blob_to_text(CONTAINERNAME,BLOBNAME)
    df = pd.read_csv(StringIO(blobstring))
    

提交回复
热议问题