Check that (pandas) dataframe has rows without counting them all
I’d like to know if a DataFrame I’m modifying is empty yet. The obvious way would be to compute its length. But that requires counting every row, which is extremely inefficient. Is there a more elegant way?