def coalesce(s: pd.Series, *series: List[pd.Series]): """coalesce the column information like a SQL coalesce.""" for other in series: s = s.mask(pd.isnull, other) return s because given a DataFrame with columns with ['a', 'b', 'c'], you can use it like a SQL coalesce, df['d'] = coalesce(df.a, df.b, df.c) More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.