Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set_dataframe function reached cell limit #589

Open
linglp opened this issue Oct 24, 2023 · 0 comments
Open

set_dataframe function reached cell limit #589

linglp opened this issue Oct 24, 2023 · 0 comments

Comments

@linglp
Copy link

linglp commented Oct 24, 2023

Note, if this is a usage question, please ask a question in stackoverflow with pygsheets tag.

Describe the bug
set_dataframe seems to have the limit of 1,000,000 cells, but Google API limit is 10,000,000 cells (see documentation here)

To Reproduce
Steps to reproduce the behavior:

gc = ps.authorize(custom_credentials='mock creds')
sh = gc.create('my google sheet')
wks = sh[0]
mock_manifest_df = pd.DataFrame(index=np.arange(1000000), columns=np.arange(1))
wks.set_dataframe(mock_manifest_df, (1, 1), fit=True)
# see error
  File "/Users/lpeng/Library/Caches/pypoetry/virtualenvs/schematicpy-9OomxyhV-py3.10/lib/python3.10/site-packages/googleapiclient/http.py", line 938, in execute
    raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 400 when requesting https://sheets.googleapis.com/v4/spreadsheets/1n8CLrthzK3SHSU74Ud3E_Rgq6KfzJSJBVoesM8UM8qQ:batchUpdate?fields=%2A&alt=json returned "Invalid requests[0].updateSheetProperties: This action would increase the number of cells in the workbook above the limit of 10000000 cells.". Details: "Invalid requests[0].updateSheetProperties: This action would increase the number of cells in the workbook above the limit of 10000000 cells.">

System Information

  • OS: [e.g. iOS]
  • pygsheets version :
 name         : pygsheets                         
 version      : 2.0.6                             
 description  : Google Spreadsheets Python API v4 

dependencies
 - google-api-python-client >=2.50.0
 - google-auth-oauthlib >=0.7.1

  • pygsheets installed from (github or pypi): installed by using poetry add
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant