-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
series.rename doesn't return 'None' when inplace=True #28920
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
Comments
Hi, is it alright if I work on this? |
Yes of course. I didn't start working on it because I don't know how
inplace is actually implemented. If you know it, it should be relatively
easy :)
|
I agree that the current implementation is inconsistent. That being said, this could be a breaking change for some people. How should we address this? |
I don’t think we want to change this.
… On Oct 11, 2019, at 16:24, pv8493013j ***@***.***> wrote:
I agree that the current implementation is inconsistent. That being said, this could be a breaking change for some people. How should we address this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I'm not sure if I agree with this. I think it's quite safe to change the implementation. In fact, I just see two options:
I'd agree with calling it a 'breaking change' just in a hypothetic case 3: The reasons why I proposed this change are:
Why do you think it could be a breaking change for anyone? |
We have an issue about deprecating inplace: #16529 I’d prefer not to make changes (breaking or deprecations) while that’s pending. |
@TomAugspurger noting your comments about not wanting to make changes, but since I think this could be considered a bug, it maybe worth getting this fixed for 1.0 |
... without deprecation cycle |
hmm this is quite inconsistent with the return value of an inplace operation elsewhere - so i would consider this a bug we r not doing an inplace deprecation for 1.0 so i think fixing this return value is worthwhile since this has been in place quite a while a deprecation cycle is warranted - would be happy to take that for 1.0 |
on my previous comment; actually this would be very hard to deprecate as it’s a return value (meaning it would always show the deprecation warning if inplace=True) sp choice between doing. nothing until we deprecate inplace or do a breaking chance and just change the return value to None? i am +0 on breaking this now - so not super strong |
I just don't think the benefit of this change (consistency, anything else?) warrants breaking API. |
I basically raised this topic because:
So yes, this is technically a bug but the method does what it should do (plus it does an extra thing that it shouldn't do). The only benefit I see is that if we changed it we wouldn't have developers wondering if the method has worked as they expect (so they could save a little time). But I'm +1 to wait for the |
Pushing off 1.0. |
Code Sample, a copy-pastable example if possible
Problem description
When a method is called with the
inplace
argument, the method should:None
In this case, the method does:
Expected Output
None
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here below this line]INSTALLED VERSIONS
commit : None
python : 3.7.4.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 0.25.1
numpy : 1.16.5
pytz : 2019.3
dateutil : 2.8.0
pip : 19.2.3
setuptools : 41.4.0
Cython : 0.29.13
pytest : 5.2.1
hypothesis : None
sphinx : 2.2.0
blosc : None
feather : None
xlsxwriter : 1.2.1
lxml.etree : 4.4.1
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.10.3
IPython : 7.8.0
pandas_datareader: None
bs4 : 4.8.0
bottleneck : 1.2.1
fastparquet : None
gcsfs : None
lxml.etree : 4.4.1
matplotlib : 3.1.1
numexpr : 2.7.0
odfpy : None
openpyxl : 3.0.0
pandas_gbq : None
pyarrow : None
pytables : None
s3fs : None
scipy : 1.3.1
sqlalchemy : 1.3.9
tables : 3.5.2
xarray : None
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : 1.2.1
The text was updated successfully, but these errors were encountered: