cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

get data from sharepoint folder/link using python script

I need to have a new script in Power BI and let it read all files that I have inside this folder. How can I do that? What is folder in sharepoint?

The most simple code to do this task:

 

import pandas as pd

 

# data loading and processing
path = "C:\\Users\\nelda\\Documents\\Projects\\project1\\dataset.csv"
dataset = pd.read_csv(path)

 

However I am not sure how to do that for sharepoint.

2 REPLIES 2
Super User IV
Super User IV

Potentially could just use the web url for the file in SharePoint. Otherwise, perhaps this will be of assistance:

https://stackoverflow.com/questions/20945822/how-to-access-a-sharepoint-site-via-the-rest-api-in-pyt...

 


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thanks but that doesn't work, 403 error message. That actually does not work for many people.

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors