Checking that spark dataframe is empty

Hubert-Dudek
Databricks MVP

#databricks #spark 3.3 has introduced a simple yet powerful isEmpty() function for DataFrames. Gone are the days of using count() to check for empty DataFrames — now it'**bleep** as easy as calling df.isEmpty().

Screenshot 2023-08-29 143021.png


My blog: https://databrickster.medium.com/

jose_gonzalez
Databricks Employee
Databricks Employee

Thank you for sharing this @Hubert-Dudek !!!