Examples
An example of an actual empty DataFrame where the index is empty:
import numpy as np
import pandas as pd
df_empty = pd.DataFrame({'P' : []})
df_empty
df_empty.empty
If we only have NaNs in our DataFrame, it is not considered empty! We will need to drop
the NaNs to make the DataFrame empty:
df = pd.DataFrame({'P' : [np.nan]})
df
df.empty
df.dropna().empty