Published on
· Data Independent

Pandas Where | pd.DataFrame.where()

This post is auto-generated from a public YouTube video for personal study notes. It is not an endorsement. The transcript is machine-derived and may contain errors; refer to the original video for accuracy.

About this video

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")

Loading transcript…