url = 'https://cchellenic.sharepoint.com/:x:/s/DataProject/EQBBeHbyS8VCuzpQHhE0WxgBQjDtvysYnoUej-KIzeC6Rw?e=nVRbNQ' username = 'email' password = 'parola' ctx_auth = AuthenticationContext(url) if ctx_auth.acquire_token_for_user(username, password): ctx = ClientContext(url, ctx_auth) web = ctx.web ctx.load(web) ctx.execute_query() print("Authentication successful") response = File.open_binary(ctx, url) #save data to BytesIO stream bytes_file_obj = io.BytesIO() bytes_file_obj.write(response.content) bytes_file_obj.seek(0) #set file object to start #read excel file and each sheet into pandas dataframe df = pd.read_excel(bytes_file_obj, sheetname = "OHD Structure")
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter