pandas.DataFrame.combine_first¶
- DataFrame.combine_first(other)¶
Combine two DataFrame objects and default to non-null values in frame calling the method. Result index columns will be the union of the respective indexes and columns
Parameters: other : DataFrame Returns: combined : DataFrame Examples
a’s values prioritized, use values from b to fill holes:
>>> a.combine_first(b)