When I use col_count in gspread I get the total number of columns of the Google sheet, even though only three columns contain data, also with the rows. It would be more useful if I could get the number of columns and rows with data. Is there a way to do that?
相关问题
- Django __str__ returned non-string (type NoneType)
- How to postpone/defer the evaluation of f-strings?
- ImportError shows up with py.test, but not when ru
- Comparing pd.Series and getting, what appears to b
- Django Attribute error 'datetime.timedelta'
相关文章
- Airflow depends_on_past explanation
- Raspberry Pi-Python: Install Pandas on Python 3.5.
- Numpy array to TFrecord
- How to split a DataFrame in pandas in predefined p
- Error following env.render() for OpenAI
- AttributeError: 'Series' object has no att
- ImportError: cannot import name 'joblib' f
- How to save a file downloaded from requests to ano
The functions of row_count and col_count will grab all active rows/columns regardless of rather they hold data or not.
Two workarounds for this: 1. build you own function to check if data exists which user user222216 stated above ( I did not check if it worked)
Get all the data and count it For example:
ADutta has provided the solution for a single row, this expands on that answer to show the size of the entire non-blank worksheet, assuming consecutive non-blank rows.
That's seems a problem for me also. But for me these works nicely