Skip to content
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

BUG: Series.duplicated doesn't preserve Series name #7375

Closed
2 of 3 tasks
MarcoGorelli opened this issue Aug 26, 2024 · 1 comment · Fixed by #7395
Closed
2 of 3 tasks

BUG: Series.duplicated doesn't preserve Series name #7375

MarcoGorelli opened this issue Aug 26, 2024 · 1 comment · Fixed by #7395
Labels
bug 🦗 Something isn't working P3 Very minor bugs, or features we can hopefully add some day. pandas concordance 🐼 Functionality that does not match pandas

Comments

@MarcoGorelli
Copy link

Modin version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest released version of Modin.

  • I have confirmed this bug exists on the main branch of Modin. (In order to do this you can follow this guide.)

Reproducible Example

In [1]: import modin.pandas as pd

In [2]: pd.Series([1,2,3], name='a').duplicated()
Out[2]: 
0    False
1    False
2    False
dtype: bool

In [3]: pd.Series([1,2,3], name='a').duplicated().name

Issue Description

The name is not preserved

I noticed this in Narwhals

Expected Behavior

pandas preserves the name:

In [1]: import pandas as pd

In [2]: pd.Series([1,2,3], name='a').duplicated().name
Out[2]: 'a'

Error Logs

Replace this line with the error backtrace (if applicable).

Installed Versions

INSTALLED VERSIONS

commit : c8bbca8
python : 3.11.9.final.0
python-bits : 64
OS : Linux
OS-release : 5.15.153.1-microsoft-standard-WSL2
Version : #1 SMP Fri Mar 29 23:14:13 UTC 2024
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8

Modin dependencies

modin : 0.31.0
ray : None
dask : 2024.8.1
distributed : 2024.8.1

pandas dependencies

pandas : 2.2.2
numpy : 2.1.0
pytz : 2024.1
dateutil : 2.9.0.post0
setuptools : None
pip : None
Cython : None
pytest : 8.3.2
hypothesis : 6.111.2
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.4
IPython : 8.26.0
pandas_datareader : None
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : None
bottleneck : None
dataframe-api-compat : None
fastparquet : None
fsspec : 2024.6.1
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 17.0.0
pyreadstat : None
python-calamine : None
pyxlsb : None
s3fs : None
scipy : 1.14.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2024.1
qtpy : None
pyqt5 : None

@MarcoGorelli MarcoGorelli added bug 🦗 Something isn't working Triage 🩹 Issues that need triage labels Aug 26, 2024
@noloerino noloerino added pandas concordance 🐼 Functionality that does not match pandas P3 Very minor bugs, or features we can hopefully add some day. and removed Triage 🩹 Issues that need triage labels Sep 12, 2024
noloerino added a commit to noloerino/modin that referenced this issue Sep 12, 2024
Signed-off-by: Jonathan Shi <jhshi07@gmail.com>
anmyachev added a commit that referenced this issue Sep 14, 2024
* FIX-#7375: Fix Series.duplicated dropping name

Signed-off-by: Jonathan Shi <jhshi07@gmail.com>

* Update modin/pandas/series.py

Co-authored-by: Anatoly Myachev <anatoliimyachev@mail.com>

---------

Signed-off-by: Jonathan Shi <jhshi07@gmail.com>
Co-authored-by: Anatoly Myachev <anatoliimyachev@mail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🦗 Something isn't working P3 Very minor bugs, or features we can hopefully add some day. pandas concordance 🐼 Functionality that does not match pandas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@noloerino @MarcoGorelli and others