Я хочу сохранить DataFrame панда Python в Azure, но решение Jay Gong (Python 2.7) дает мне ошибки:
from azure.storage.blob import BlockBlobService
service = BlockBlobService(
account_name=STORAGE_ACCOUNT_NAME,
account_key=STORAGE_ACCOUNT_KEY
)
with io.StringIO() as stream:
df.to_csv(stream, encoding="utf-8")
service.create_blob_from_text('containert', 'example.txt', stream)
Возвращает:
AttributeError: у объекта '_io.StringIO' нет атрибута 'encode'
- питон 3,7
- Панды 0,23,4
- azure-blob-storage 1.3.1