Google Sheets QUERY: Blank, Null and Empty-String Conditions
Filter blank and non-blank rows in Google Sheets QUERY, including is null, is not null, empty strings and formulas that display blank values.
Read guidePractical, example-led guides for solving real problems with spreadsheets, Python and business automation.
# Turn a repetitive task into a script
from pathlib import Path
files = Path("reports").glob("*.csv")
for report in files:
clean(report)
print(f"✓ {report.name}")
# Small script. Big time saved.Filter blank and non-blank rows in Google Sheets QUERY, including is null, is not null, empty strings and formulas that display blank values.
Read guideUnderstand Python *args and **kwargs, how they collect function arguments, and how one or two asterisks unpack lists and dictionaries in calls.
Read guideSort a Python list of lists by multiple columns using tuple keys, itemgetter, mixed ascending and descending order, and missing-value handling.
Read guide