We can also drop rows that have NaN values. To do so, we can use the how=all argument to drop only those rows entire values are entirely NaN:
dfx.dropna(how='all')
The output of the preceding code is as follows:
Note that only the orange rows are removed because those entire rows contained NaN values.