Comments (1)
Turns out that CRM26
is a valid cell address in Sheets -- CRM
is the column identifier, and 26
is the row. Columns go from A
to ZZZ
and any letter combination therein is a valid column identifier, including CRM
.
This apparently causes problems for the underlying call to gspread
's Spreadsheet.values_get
, whose first argument is a "range in A1 notation". Such a range can be A1:B3
, or Sheet1!A1:B3
, or even just Sheet1
to indicate the entire cell range in worksheet Sheet1
. A single cell reference, like A1
, is invalid -- it must be a range.
So if a worksheet happens to have the name that is also a valid cell reference, such as A1
-- or CRM26
-- gspread is passing that to the API unquoted, and the API interprets it as a single cell reference and rejects it as an invalid argument.
I don't believe that it's gspread's fault -- the range argument to values_get
is taken in good faith by gspread and dutifully passed to the API.
The solution will be to have get_as_dataframe
take care to enclose the worksheet name in a range reference in single quotes, and to escape (as ''
) any single quote character occurring in a worksheet name:
https://developers.google.com/sheets/api/guides/concepts#a1_notation
from gspread-dataframe.
Related Issues (20)
- buggy behavior when dealing with decimals? HOT 5
- Bug: Object of type int64 is not JSON serializable - introduced by Version 3.1.1 HOT 8
- Bug: escaping when allow_formulas = False is not returning any value HOT 1
- set_with_dataframe: TypeError: Object of type 'int64' is not JSON serializable HOT 2
- Sheets API erroneously rejects new rowCount if (new rowCount * old columnCount) > 5000000 (was: Bug in the number of cells of the dataframe HOT 4
- Cannot use gspread's add_row() method before using set_with_dataframe() HOT 8
- Can't import, "No module named gspread.models" HOT 1
- Consider allowing option to drop duplicates in set_with_dataframe HOT 4
- Data gets interpreted even when using dtype=str HOT 1
- ModuleNotFoundError: No module named 'gspread.models' HOT 7
- Write header rows for DataFrames with MultiIndex columns so that Pandas reads them properly HOT 1
- Include formatting options in set_with_dataframe
- Consider offering a reader/writer object based on a given dataframe
- return API response from set_with_dataframe HOT 5
- No module named 'gspread' HOT 2
- Feature Request: Append feature to an existing sheet. HOT 1
- Max Cell Count
- Newest version gspread not compatible HOT 7
- get_as_dataframe() is reading the whole sheet data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gspread-dataframe.