Questions tagged [pygsheets]

A python library to access Google Spreadsheets through the Google Sheets API. Use this tag to ask questions about pygsheets usage and errors

pygsheets is a python library to access Google Spreadsheets through the Google Sheets API (currently API v4). Use this tag to ask questions about pygsheets usage and errors.

Github for the package: https://github.com/nithinmurali/pygsheets

Full package documentation: https://pygsheets.readthedocs.io/en/stable/

167 questions
0
votes
3 answers

Using importjson when cell is an URL, JSON format in Gsheets

I was looking for a solution that could help me to format JSON input into GSheets output (split in row and column). I would like to use =importjson but my function is a CELL instead of a URL. I have attached an example of input and output. Hope that…
0
votes
1 answer

Creating a loop in google sheet to find value and update it

i'm wondering it that possible to create a loop through google sheets to find a value and update it? This is my worksheet data: i want to update all rows with "all" headers with other values. I tried to solve this by this code, but it didn't gave…
Antonych
  • 79
  • 7
0
votes
2 answers

How to merge cells in google sheet using Pygsheets library in Python

After i exported data from dataframe to googlesheet, it looked like this: I wish i can merge repeated columns and get this kind of result: This is the part of code which is responsible for merging cells: df1 = wks.get_as_df() df1 =…
0
votes
0 answers

How should I investigate strange behaviour of a Python script in various machines?

I have written a Python3 script to scrape covid19 data from various websites, do some processing and publish it to Google spreadsheets. I have tested the code thoroughly on my machine and it was working as expected. The Python3 script was supposed…
L'Unità
  • 95
  • 1
  • 9
0
votes
1 answer

Race condition in Google Sheets API

I am using pygsheets to update and delete data in a Google Sheet. The data is refreshed by using the append_table function to delete the old data and insert the new data. Is it possible that two user make the same request at the same time, resulting…
Arvind Kumar
  • 259
  • 4
  • 15
0
votes
1 answer

name 'WorksheetNotFound' is not defined

I'm trying to use try/except for error handling working with the pygsheets library. My code is as follows: def export_col_values(workbook, df, columns): """for a list of columns, creates a new sheet for each column and exports unique values and…
0
votes
1 answer

Create a histogram with pygsheets add_chart()

I am trying to create a histogram chart using pygsheets .add_chart() function. To do so, I only want to pass a domain argument since I only need one column of data for the histogram. However when I leave out the range argument like…
0
votes
0 answers

DICT object has no attribute 'Select_dtypes' Export Pandas DF to Google Sheets

I am having some trouble with Dict object has no attribute 'select_dtypes' I have a dataframe that looks like the following.... { 'miley cyrus' :{'top': query value 0 cyrus…
0
votes
0 answers

Warnings displaying in console while executing exe created from python File,Need help in Hiding the warnings

I need help with Hiding Warnings from Executable which I have created using Pyinstaller library and below is Command I have used while creating the executable file. pyinstaller -y -F "D:/Vipul Garg…
Vipul_Garg
  • 43
  • 1
  • 8
0
votes
1 answer

Pygsheets and AWS Lambda

I am sure the suggestions here will be to use an S3 bucket and I am aware of this. My question is a bit more difficult, from what I am gathering, in that I want to use Pygsheets, a python library, to write to a Google Sheet. However, after getting…
eccadena
  • 171
  • 1
  • 8
0
votes
1 answer

What is this data structure in pygsheets?

# Authorize Spreadsheet Access gc = pygsheets.authorize(service_file=gServiceAccAuthFile, retries=1) # Open spreadsheet sh = gc.open_by_key(gSheetKey) # Open Worksheet wks = sh.worksheet_by_title(gWorksheetName) mydict =…
itChi
  • 642
  • 6
  • 19
0
votes
1 answer

How to Handle Exception HTTP 400 | Django Rest Framework

I tried to remove the worksheet in Google docs file. I am using Pygsheets to perform this process. There's only one sheet in that file. So we can't remove the sheet. so it will throw the Error. How i handle it Separately. Below is i tried something.…
0
votes
0 answers

How to print Xpaths to Gsheets using Python Selenium Pandas?

So previously I had some issues writing my desired info from a list to csv. I got some help here on SO and managed to do what I wanted given given the following code: import csv from selenium import webdriver from selenium.webdriver.common.keys…
Neverend
  • 35
  • 8
0
votes
1 answer

TypeError: 'bool' object has no attribute '__getitem__' when trying to use unlink()

I need to do lots of protected range manipulation. I want to unlink the sheet to perform the operations on a local copy and sync it afterwards. This, however, doesn't work. spreadsheet = googleCloud.open_by_key(key) worksheets =…
0
votes
1 answer

Receiving a cell not found error when using worksheet[#][#] to find a cell value

When trying to access a cell via worksheet[#][#] beyond the first 90 cells, I receive a pygsheets.exceptions.CellNotFound error from a worksheet that has almost 3000 cells. I've run a find to find all the cells with a certain value that I need to…
user225161
  • 3
  • 1
  • 2