Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
w3resource

Pandas DataFrame property: empty

DataFrame - empty property

The empty property indicates whether DataFrame is empty or not.

True if DataFrame is entirely empty (no items), meaning any of the axes are of length 0.

Syntax:

DataFrame.empty

Returns: bool,
If DataFrame is empty, return True, if not return False.

Notes

If DataFrame contains only NaNs, it is still not considered empty.

Example:


Download the Pandas DataFrame Notebooks from here.

Previous: DataFrame - memory_usage() function
Next: DataFrame - astype() function