DataFrame.empty

pandas.DataFrame.empty

DataFrame.empty

True if NDFrame is entirely empty [no items], meaning any of the axes are of length 0.

Notes

If NDFrame contains only NaNs, it is still not considered empty. See the example below.

Examples

An example of an actual empty DataFrame. Notice the index is empty:

>>> df_empty = pd.DataFrame({'A' : []})
>>> df_empty
Empty