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

Function get_all_records() having issue when we pass head parameter greater than 1 #810

Closed
grkamarnath opened this issue Sep 2, 2020 · 2 comments

Comments

@grkamarnath
Copy link

Suppose i have a google sheet with 3 rows like shown below.

Header1 Header2 Header3
value1 value2 value3
value4 value5 value6

then, we called function get_all_records(head=2), it will return 1 row but keys of the row is not correct.
output: [{value1:value4, value2:value5, value3:value6}]

Expected/Correct output: [{Header1:value4, Header2:value5, Header3:value6}]

@yberezkin
Copy link

yberezkin commented Sep 2, 2020

In my understanding of documentation for code it is works as it supposes to work.
"""Returns a list of dictionaries, all of them having the contents of
the spreadsheet with the head row as keys and each of these
dictionaries holding the contents of subsequent rows of cells as
values.
”””

What @grkamarnath you are talking about is to skip 1rst row, which logically not a head.

”:param int head: (optional) Determines which row to use as keys,
starting from 1 following the numeration of the spreadsheet.”

@grkamarnath
Copy link
Author

Thank you @yberezkin

I miss understood the head parameter purpose..

ashlonzo referenced this issue Sep 11, 2020
Fix the documentation link to readthedocs.
This issue was closed.
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

2 participants