-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
SeriesGroupby transform unique not working in Pandas 1.0.1 #31849
Comments
Thanks. In the future, can you include the full traceback? I've added it |
Last touched in #29672 (cc @jbrockmendel) but I haven't checked if it was working prior to that commit. |
IIRC #29672 was intended to be logic-neutral. |
If I've done git bisect correctly, it stopped working after this PR: #27467 |
Hmm this seems a little hacky as nothing else in our built-in transform machinery returns a non-scalar (at least that I can think of off the top of my head) Note that Given that, I'd be -1 on this being considered a regression or even a bug |
Makes sense. Currently the whitelisted kernels either return a single numeric value ( Should this be closed then? |
this is not a transformation kernel, you can do this if you want
|
Code Sample, a copy-pastable example if possible
Problem description
Since pandas 1.0.1, unique does not seem to be a whitelisted transform function for SeriesGroupby objects anymore. The above code works with pandas 0.25.3 but not with 1.0.1 It raises a ValueError exception:
I tried to find a documentation on that changed but was not succesful. If that is the intended behaviour, I think it would be helpful to document it.
Expected Output
0 [a1, c1]
1 [b1]
2 [c1, c2]
3 [c1, c2]
4 [a1, c1]
Name: asset_id, dtype: object
Output of
pd.show_versions()
[paste the output of
pd.show_versions()
here below this line]INSTALLED VERSIONS
commit : None
python : 3.8.1.final.0
python-bits : 64
OS : Darwin
OS-release : 18.7.0
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.UTF-8
pandas : 1.0.1
numpy : 1.18.1
pytz : 2019.3
dateutil : 2.8.1
pip : 19.0.3
setuptools : 40.8.0
Cython : None
pytest : 5.3.5
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
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 5.3.5
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : 1.3.13
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : None
numba : None
The text was updated successfully, but these errors were encountered: