I’ve successfully connected to Google Drive and imported a csv into the anvil environment, however I’m wondering now how I can save a csv to that same Google Drive.
I create the dataframe using pandas, but I’m not entirely sure how to save it.
That’s a first step, but really I want to modify an existing csv file currently on the drive.
So the steps would be:
Pull csv from Google Drive. (Successfully Completed)
Create new dataframe and append it to original csv (Successfully Completed)
Replace original csv in Google Drive folder with updated csv (Not Yet Completed).
folder = app_files.my_folder
for f in folder.list_files():
with anvil.media.TempFile(f) as file_name:
if f['title'] == 'my_file.csv':
my_file=f
tobemanipulated = pd.read_csv(file_name)
Then I do some stuff and create a new dataframe and append it to the old one: