2

I have a DataFrame that I would like to store as a CSV file in a Sharepoint. It seems that the only way is to first save CSV file locally and then, using Shareplum, upload file to Sharepoint. Is there a way to directly save DataFrame into Sharepoint as CSV file, without creating a local file? Thanks a lot for your help.

Gerd
  • 2,568
  • 1
  • 7
  • 20

1 Answers1

1

It should be possible to write the csv content to an in-memory text buffer (e.g. StringIO or ByteIO) rather than to a local file - here is an example (last section of the page).

After that, you could use a library for writing the content directly to a Sharepoint: This discussion shows several approaches how to do that, including the Office365-REST-Python-Client and also SharePlum, which you have already mentioned.

Here are two more sources (Microsoft technical doc) that you might find useful:

Gerd
  • 2,568
  • 1
  • 7
  • 20