You can use the attribute df.empty
to check whether it’s empty or not:
if df.empty:
print('DataFrame is empty!')
Source: Pandas Documentation
You can use the attribute df.empty
to check whether it’s empty or not:
if df.empty:
print('DataFrame is empty!')
Source: Pandas Documentation