Here's my setup and what I want to accomplish:
- I currently have a Google Form set up for users to submit information, which is then logged in a Google Sheet.
- I then, use PyDrive to save the contents of the Google Sheet as a csv.
- Pandas then reads that csv, and deletes data within the csv based on certain criteria.
- After that, I use PyDrive to re-upload the "fixed" csv to Google sheets, saving over the old one.
Here's the problem:
whenever I do this, it terminates the link between the Google Sheet and Google Form. Is there some way I can preserve this link or re-link the Form and the Sheet?
Here is the snippet of code I have been playing with:
submissions_data = drive.CreateFile({'id': ext['SUBMISSIONS_ID']})
submissions_data.GetContentFile("data.csv", mimetype = "text/csv")
df = pd.read_csv("data.csv")
df.drop([0],inplace=True)
df.to_csv("data.csv", index=False)
submissions_data.SetContentFile("data.csv")`
Preferably, I would like to find a way to do this using PyDrive, but anything will work at this point. Any help is appreciated! Thank you!