问题
Is there a dask equivalent of pandas empty
function? I want to check if a dask dataframe is empty but df.empty
return AttributeError: 'DataFrame' object has no attribute 'empty'
回答1:
Dask doesn't currently support this, but you can compute the length on the fly:
len(df) == 0
len(df.index) == 0 # Likely to be faster
来源:https://stackoverflow.com/questions/50206730/how-to-check-if-dask-dataframe-is-empty