python
Pandas - How to check whether a pandas DataFrame is empty
if df.empty:
print('DataFrame is empty!')
data
df.DataFarame(data) if data are empty ,dose not raise an exception
Was this helpful?
Similar Posts
- Check if list is empty in Python
- Check if dictionary is empty in Python
- [Pandas] Check if a column exists in a DataFrame
- Check if a column contains zero values only in Pandas DataFrame
- Pandas - Delete,Remove,Drop, column from pandas DataFrame
- Checking if List is empty in Python with Examples
- Pandas DataFrame to CSV