1. Help Center
  2. Python Programming

How Can You Check Whether a Pandas Dataframe Is Empty or Not?

he attribute df.empty is used to check whether a pandas data frame is empty or not.
 
>>import pandas as pd
 
>>df=pd.DataFrame({A:[]})
 
>>df.empty
 
Output: True