gspread

MultiIndex pandas dataframe and writing to Google Sheets using gspread-pandas

MultiIndex pandas dataframe and writing to Google Sheets using gspread-pandas Question: Starting with the following dictionary: test_dict = {‘header1_1’: {‘header2_1’: {‘header3_1’: {‘header4_1’: [‘322.5’, 330.0, -0.28], ‘header4_2’: [‘322.5’, 332.5, -0.26]}, ‘header3_2’: {‘header4_1’: [‘285.0’, 277.5, -0.09], ‘header4_2’: [‘287.5’, 277.5, -0.12]}}, ‘header2_2’: {‘header3_1’: {‘header4_1’: [‘345.0’, 357.5, -0.14], ‘header4_2’: [‘345.0’, 362.5, -0.14]}, ‘header3_2’: {‘header4_1’: [‘257.5’, 245.0, -0.1], ‘header4_2’: [‘257.5’, …

Total answers: 3

gspread requires an older google-auth

gspread requires an older google-auth Question: Today pip -install –user –upgrade told me gspread 5.7.0 requires google-auth==1.12.0, but you have google-auth 2.14.1 which is incompatible. Please note the huge discrepancy in google-auth version numbers: 1.12 vs 2.14. I think I update my packages often enough, so this huge jump in google-auth version numbers is a …

Total answers: 1

Python, gspread. How i can cut or parse my list

Python, gspread. How i can cut or parse my list Question: when I use the worksheets() function from gspread package I obtain the list, but this list contains not only string type. how can I obtain only string? Here is my code: import gspread cred = gspread.service_account(filename="creds.json") sheet = cred.open("nameoftable") sheet_list = sheet.worksheets() print(sheet_list) Out …

Total answers: 1

How to print JSON data to a Google Sheet using GSpread

How to print JSON data to a Google Sheet using GSpread Question: I have tried every possible fix I can find online, unfortunately, I’m new to this and not sure if I’m getting closer or not. Ultimately, all I am trying to do is print a JSON feed into a Google Sheet. GSpread is working …

Total answers: 1

How can I only compare dd/mm against dd/mm/yyyy in Google sheets?

How can I only compare dd/mm against dd/mm/yyyy in Google sheets? Question: Today I have a bit more of a complicated question: I have a Google sheet that has the has real dates (dd/mm/yyyy) in one column. While checking, I want to check it against the following: date_format = datetime.today().strftime(‘%d/%m’) Which would only check dd/mm …

Total answers: 1

How to append a new worksheet and upload a local CSV in gspread

How to append a new worksheet and upload a local CSV in gspread Question: I checked the docs of gspread but couldn’t find out a way to APPEND a new local csv into a worksheet into a preexisting sheet. As far as I see the import function just cleans and uploads into the first page. …

Total answers: 1

how to check item is exists and renew value only in python gspread

how to check item is exists and renew value only in python gspread Question: How to check item is exists and renew value only, if not exists and add new one? For example: I have an item 1 and value 1 already in my sheet, and then I get new value of item 1, I …

Total answers: 1

Python gspread Hyperlink adds '

Python gspread Hyperlink adds ' Question: I want to add a Hyperlink to a cell. I’m using the following code: cell_values = [1,’=HYPERLINK("’ + some_url + ‘","’ + some_text + ‘")’,3] for i, val in enumerate(cell_values): cell_list[i].value = val worksheet.update_cells(cell_list) What is printed into the cell: ‘=HYPERLINK("someLink","someText") The cell should be formatted as a Hyperlink, …

Total answers: 2

How to add a nested list with gspread?

How to add a nested list with gspread? Question: Can someone help me please with implementation of a nested list via gspread? Screenshot of what i want to do. Asked By: andreykirv || Source Answers: I believe your goal and your current situation as follows. You want to create a dropdown list in a cell. …

Total answers: 3

How to fix the "google.auth.exceptions.RefreshError: ('No access token in response." when trying to open a spreadsheet using GoogleSheet API

How to fix the "google.auth.exceptions.RefreshError: ('No access token in response." when trying to open a spreadsheet using GoogleSheet API Question: I followed the video from TechWithTim step by step (https://www.youtube.com/watch?v=cnPlKLEGR7E) but I am still getting an error when I try to open the sheet. The code works fine until sheet = client.open("GuildTaxes").sheet1 line. Here is …

Total answers: 1