Issue
I successfully can connect and read SharePoint lists via the Office 365 Sharepoint REST API in Python.
From the for loop I want to bring it into a data frame. Currently I have no idea, why I get a data frame where all columns are getting combined into one.
Solution
You can use a dictionary in for loop and then convert it to pd.DataFrame(dict)
.
my_dict = {"Spalte":[],"Spalte1":[]}
for item in items:
my_dict["Spalte"].append(item.properties['Spalte'])
my_dict["Spalte1"].append(item.properties['Spalte1'])
df = pd.DataFrame(my_dict)
The above method can produce the output you want.
Answered By - jeongwhanchoi
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.