gspread-dataframe icon indicating copy to clipboard operation
gspread-dataframe copied to clipboard

get_as_dataframe() is reading the whole sheet data

Open GmGniap opened this issue 1 year ago • 0 comments

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 avatar Feb 20 '24 12:02 GmGniap