Skip to content

ENH: implement fill_value for df.add(other=Series) #13488 #32335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

jonathanrhughes
Copy link

@@ -771,6 +793,12 @@ def f(self, other, axis=default_axis, level=None, fill_value=None):
if _should_reindex_frame_op(self, other, axis, default_axis, fill_value, level):
return _frame_arith_method_with_reindex(self, other, op)

if not is_number(fill_value) and fill_value is not None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i dont think this condition is right. what if the series we are working with is e.g. datetime64?

@@ -10,6 +10,16 @@ including other versions of pandas.

.. ---------------------------------------------------------------------------

.. _whatsnew_102.enhancements:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would go in the 1.1.0 file

@jbrockmendel
Copy link
Member

All in all, I'd rather deprecate support for fill_value and ask users to do fillna on their own; I don't think the code complication is worth it

@jonathanrhughes
Copy link
Author

@jbrockmendel Thank you for reviewing this PR. I'd be happy to try a PR for the deprecation of support for fill_value. I'm new to open source (this is my first contribution) so I'd appreciate it if you could let me know whether this deprecation is worth spending my time on. Otherwise, I'll select another open Pandas issue to work on.

@jbrockmendel
Copy link
Member

@jonathanrhughes welcome! I would not advise doing that deprecation right away since it has not been agreed upon. Your best bet is to look at issues with the "good first issue" tag (skip the first page or two of results, as those have gotten crowded).

@WillAyd
Copy link
Member

WillAyd commented Feb 29, 2020

All in all, I'd rather deprecate support for fill_value and ask users to do fillna on their own; I don't think the code complication is worth it

I would agree with this

@jonathanrhughes welcome! I would not advise doing that deprecation right away since it has not been agreed upon. Your best bet is to look at issues with the "good first issue" tag (skip the first page or two of results, as those have gotten crowded).

And this. Let's see what others think

@WillAyd WillAyd added the Needs Discussion Requires discussion from core team before further action label Feb 29, 2020
@WillAyd
Copy link
Member

WillAyd commented Feb 29, 2020

But in any case @jonathanrhughes thanks for pushing this PR. Very impressive for a first time contribution!

@jonathanrhughes
Copy link
Author

@WillAyd I appreciate the feedback. Thank you.

@WillAyd
Copy link
Member

WillAyd commented Mar 11, 2020

Well its been 10 days and I haven't seen anything in support of this so going to close. But in any case thanks again @jonathanrhughes - the PR is impressive just not something we have an appetite for

@WillAyd WillAyd closed this Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Discussion Requires discussion from core team before further action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ENH: df.add fill_value NotImplementedError
3 participants