-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
Closed
Labels
Docscombine/combine_first/updateNDFrame.combine, combine_first, updateNDFrame.combine, combine_first, update
Description
Location of the documentation
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.combine.html
Documentation problem
The fourth example states:
However, if the same element in both dataframes is None, that None is preserved
In the code sample to illustrate this, however, None is not preserved:
df1 = pd.DataFrame({'A': [0, 0], 'B': [None, 4]})
df2 = pd.DataFrame({'A': [1, 1], 'B': [None, 3]})
df1.combine(df2, take_smaller, fill_value=-5)
A B
0 0 -5.0
1 0 3.0
Suggested fix for documentation
If the actual result is the intended behavior, this code sample should be removed. If None should indeed be preserved (but why should it?) then this should be filed as a bug.
Metadata
Metadata
Assignees
Labels
Docscombine/combine_first/updateNDFrame.combine, combine_first, updateNDFrame.combine, combine_first, update