Pandas Where will replace values where your condition is False. It is useful when you have values that do not meet a criteria, and they need replacing.
We don't often use this function, but it can be a handy one liner instead of iterating through a DataFrame or Series with .apply().
pd.DataFrame.where(cond=condition_to_check, other="Value To Fill")
16 сен 2020