I have been trying to download a .csv file from sharepoint via python, but failed. I am doing the following which I found in an answer in stackoverflow.
# Access sharepoint
csv = requests.get(url="https://foobar/testbook.xlsx", data={}, auth=(email, pass))
my_df = pandas.read_csv(StringIO(csv.text))
print(my_df)
The above prints:
Empty DataFrame
Columns: [403 FORBIDDEN]
Index: []
There's no error in the output so I guess my authentication fails? I am searching for a way to download/upload files from/to sharepoint, with authentication.
Any help is appreciated.
Thanks