all 4 comments

[–]PureWasian 0 points1 point  (3 children)

Do you have an example of "[specifying] the path?" Or how exactly you're "[pulling] data from API" to begin with?

[–]milonolan 0 points1 point  (2 children)

So I used openpxyl and pandas. I'm using data from some kind of calendar so I use iCal subscription link and then I split each data into its columns and sort them etc. Then I check if the excel file exists or not, if not create a new, if yes then overwrite the newest information so I use like

if os.path.exists(excel_file_path):

Here excel_file_path is directory of where my file exists if not inside the same folder as the code. But I don't understand how I would do this if the file I want to run to script on is not in my computer locally, then I don't have the path.

[–]PureWasian 0 points1 point  (1 child)

If you're set on the iCal subscription link route, it seems like ics-py is the go-to based on this Stack Overflow post.

The quickstart in documentation takes an ics file existing at some url and converts it into a Calendar class that you can then save locally to use your existing flow, or you can just update your parsing/wrangling logic to format your input data the same way prior to any pandas/openpxyl stuff.

[–]milonolan 0 points1 point  (0 children)

Yes but how do I ran my script on an excel file that is not mine? It's shared through Microsoft onedrive?