I want to delete a record from a google spreadsheet using the gspread
library.
Also, how to can I get the number of rows/records in google spreadsheet? gspread
provides .row_count()
, which returns the total number of rows, including those that are blank, but I only want to count rows which have data.
Since gspread version 0.5.0 (December 2016) you can remove a row with delete_row()
.
For example, to delete a row with index 42, you do:
worksheet.delete_row(42)