![]() New_sheet.insert_rows(updated_df.values.tolist()) New_sheet = sheet.get_worksheet(sheet_page) # get the instance of the second sheet,for the first sheet, pass the index 0 and so on. Sheet.add_worksheet(rows=row,cols=col,title=title) # title of new data Create a function to upload an updated data to your Google Sheets on a new sheetĭef upload_data_to_gs(title,sheet_page,updated_df):.Records_data = sheet_instance.get_all_records() #For the first sheet, pass the index 0 and so on. # extract data from google sheet by the name of the sheet Gc = rvice_account(filename=creds_file) # gspread – to interact with Google Spreadsheets # obtain the client email and the data from google sheet with dataframe type Create a function to extract data from a specific Google Sheet. ![]() Here we can just simply copy can paste your client_email, and share your Google Sheet with this email. ![]() For example, we have a google sheet which contains all the data that we need to analyze, and if we want to share it, we normally use email to share the Google sheet file. There is one information from the “creds.json” that is very important - client_email. !pip install gspread oauth2client # import necessary librariesįrom rvice_account import ServiceAccountCredentials #If you did not install gspread, you need to install it first ![]() Here is the video tutorial to all the steps in the pre-work part. For the first time, you may feel very confused.
0 Comments
Leave a Reply. |