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

get_as_dataframe() is reading the whole sheet data #59

Open
GmGniap opened this issue Feb 20, 2024 · 1 comment
Open

get_as_dataframe() is reading the whole sheet data #59

GmGniap opened this issue Feb 20, 2024 · 1 comment

Comments

@GmGniap
Copy link

GmGniap commented Feb 20, 2024

Most of the cases , Google spreadsheet has 1000 rows in one tab as default. I tried to read all the tabs inside the spreadsheet and it got gspread API Error saying ""Quota exceeded for quota metric 'Read requests' and limit 'Read requests per minute per user' of service 'sheets.googleapis.com' .... ".

When I tried to print the shape of dataframes for each tab , it's showing (999, <col_num>). So, it looks like get_as_dataframe() is taking the whole sheet rows including the blank lines. I tried to use options - skip_blank_lines from this documentation that mentioned in here. But it didn't work.

My temporary solution is setting skipfooter to 900 because luckily all of my tabs had maximum 100 rows. But I felt like there should be more better solution in case we can't guess max rows in each tab.

Screenshot 2024-02-20 at 7 09 24 PM

@GmGniap GmGniap changed the title get_as_dataframe() is reading the whole spreadsheet get_as_dataframe() is reading the whole sheet data Feb 20, 2024
@robin900
Copy link
Owner

@GmGniap Another issue has been filed related to this, and I'm going to test myself the efficacy of skip_blank_lines, because that should totally work, and it would be upsetting if it didn't.

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