BUG: "unique" and pd.Series.unique produce different results with aggregation #39920
Open
3 tasks done
Labels
Apply
Apply, Aggregate, Transform, Map
Bug
Groupby
Needs Discussion
Requires discussion from core team before further action
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Code Sample, a copy-pastable example
Running this script produces
Problem description
When using "unique" str as the
aggfunc
parameter, internally it is interpreted aspd.Series.unique
. I expect identical results when passing "unique" andpd.Series.unique
, orpd.unique
but they are not.Output of
pd.show_versions()
INSTALLED VERSIONS
commit : f904213
python : 3.9.1.final.0
python-bits : 64
OS : Linux
OS-release : 5.10.11-arch1-1
Version : #1 SMP PREEMPT Wed, 27 Jan 2021 13:53:16 +0000
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.0.dev0+772.gf904213ffc
numpy : 1.20.1
pytz : 2021.1
dateutil : 2.8.1
pip : 20.2.3
setuptools : 49.2.1
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: