gspread icon indicating copy to clipboard operation
gspread copied to clipboard

getallrecords() – can there be a "rows" option to get attributes from rows, not columns?

Open lexipenia opened this issue 4 years ago • 3 comments

Is your feature request related to a problem? Please describe. Sometimes I have to work with spreadsheets that are "rotated 90 degrees" – that is, the creators use the rows to list important attributes, and then every item in the DB is listed in a column. The attributes list would have to be Column A for these sheets, not Row 1.

Describe the solution you'd like An optional argument in getallrecords() that will be able to produce dictionaries using the first column to find attribute names, not the first row.

Describe alternatives you've considered It's possible to use getallvalues() and iterate over things appropriately or create mappings. But a dictionary like the one getallrecords() produces would be much faster to work with.

lexipenia avatar Aug 26 '20 07:08 lexipenia

This sounds like a good feature to have!

If you wanted to try implementing it we can help you with any questions.

alifeee avatar Jun 08 '23 19:06 alifeee

@alifeee can I take this please after merging PR #1301 (issue #1294)?

AndrewBasem1 avatar Sep 21 '23 23:09 AndrewBasem1

@alifeee can I take this please after merging PR #1301 (issue #1294)?

As soon as #1301 is merged, yes. This looks like a good thing to do afterwards.

alifeee avatar Sep 22 '23 17:09 alifeee