Questions tagged [gspread]

gspread is an asynchronous Python library for interacting with Google Spreadsheets.

gspread is a Python library for interacting with Google Spreadsheets.

949 questions
1
vote
2 answers

How to add next range from the previous range in google sheets

I have a sheet which has multiple columns with formulas. I want to add a formula of next range in the next row of that column using script instead of doing it manually. In this code I'm trying to achieve that but every time it is going in "else"…
1
vote
1 answer

GSpread APIException: "Invalid value at 'data[0].values[0]'"

I'm trying to use gspread API, i used it before with arrays with no issue, but now when i try to use a Numpy array, i get the "Invalid value at 'data[0].values[0]'" API exception. In my snippet, maturities_1 is a numpy array consisting of floats sh…
JEREDEK
  • 87
  • 1
  • 9
1
vote
1 answer

How can I bring in updated google spreadsheet values into my python script without stopping and restarting it?

I have a python script that runs 24/7 and have a google spreadsheet that contains input values for the script. I update these values regularly. On a clean start, the initial value pulls in exactly as it should. The issue is when it needs to be…
1
vote
0 answers

Create Google SpreedSheet and have an error SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed

I am trying to create a Google Spreadsheet using Python (Jupyter Notebook). I have created a project in the Google API and downloaded the credentials, but I am encountering an error while trying to create a new sheet with the following code: import…
1
vote
0 answers

i am getting errors when i try to use gspread (python)

I am trying to access a Google Sheets spreadsheet from a Python program using the gspread library. However, when I try to open the spreadsheet using the open_by_key() function, I am getting the following…
Dhruva N U
  • 11
  • 1
1
vote
2 answers

Python/Gspread : code to remove whitespace and format data

I am building a little tool to scrape a TTRPG website for data and write the data into a google sheet. This is my code thus far : import requests from bs4 import BeautifulSoup import gspread gc =…
Tom
  • 11
  • 2
1
vote
1 answer

How do I get the list of user emails shared by gspread google API?

I've created some google spreadsheets using the gspread and shared with some lists of emails with different permissions. Is there a way to somehow get the list or dict of these emails and permissions? This is more or less my code: import gspread as…
Diego
  • 11
  • 1
1
vote
1 answer

Get data from specific sheets in google sheet and extract specific columns from it using gspread

I am trying to get specific column data out of specific sheets in one big google sheet. For example, I have a list of sheets Sheets = ['Sheet 1', 'Sheet 2', 'Sheet 3'] and from these sheets, I want to retrieve specific columns like Column_headers =…
hyeri
  • 663
  • 9
  • 26
1
vote
1 answer

AttributeError: module 'gspread' has no attribute 'service_account'

I am trying to access a spreadsheet from Colaboratory using the gspread library, but get the attribute error module 'gspread' has no attribute 'service_account' My code looks like this: import gspread as gs import pandas as pd gc =…
Samuel Mwamburi
  • 105
  • 2
  • 15
1
vote
1 answer

Append Rows issue while scraping URLs via Python loop

I'm looking to visit each URL and return every player image found within the HREF tags, meaning - visit URL, click each player, store profile image link. I had the right result printing with the code below, but it was pushing the data one by one &…
1
vote
0 answers

GSPREAD sometimes works, sometimes not work (module 'gspread' has no attribute 'service_account')

I try to connect google sheets. Yesterday it worked, today it doesn't work. The error message is module 'gspread' has no attribute 'service account' I tried pip install - import gspread - all, but the module doesn't work. The python code is the…
1
vote
1 answer

Formatting issues with Python amd GSpread

I have this panda Data Frame (DF1). DF1= DF1.groupby(['Name', 'Type', 'Metric']) DF1= DF1.first() If I output to df1.to_excel("output.xlsx"). The format is correct see bellow : But when I upload to my google sheets using python and GSpread from…
Simon GIS
  • 1,045
  • 2
  • 18
  • 37
1
vote
1 answer

How do I set dropdown colors using Google SpreadSheet API?

I am using the gspread library in python to send api requests. The request is to set the dropdown. However, I could not figure out how to set the following. set a color for each value in the dropdown set the display style to "Chip" Here is the…
karutt
  • 359
  • 1
  • 11
1
vote
1 answer

How to check share setting of gsheet by gspread

I want to check owner share settings of gsheets by using gsperad as below. img Now I can get the share data by use list_permissions(file_id) but I need more information about owner share settings by get True of False of Editors can change…
Titan
  • 13
  • 2
1
vote
1 answer

Append Multiple Dataframes and Comments Above the Dataframe into One Worksheet using Gspread and python

I am looking for a solution where I can append multiple dataframes and some comments above the dataframe into one worksheet in google sheet using gspread. Following is the example of what I need, can anyone help me with this. data = [['tom', 10],…