BUG: Series groupby with by as Series raises FutureWarning
#41683
Labels
Bug
Compat
pandas objects compatability with Numpy or Python functions
Dependencies
Required and optional dependencies
Upstream issue
Issue related to pandas dependency
Warnings
Warnings that appear or should be added to pandas
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.
I ran into this when testing dask against pandas nightly builds. dask/dask#7710
Code Sample, a copy-pastable example
Problem description
According to the series groupby docstring, I should be able to groupby series objects, but I get a
FutureWarning
Expected Output
When I call
.tolist()
on the series before passing it asby
I get the expected result:Output of
pd.show_versions()
INSTALLED VERSIONS
commit : e7c1ef7
python : 3.8.10.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0-72-generic
Version : #80~18.04.1-Ubuntu SMP Mon Apr 12 23:26:25 UTC 2021
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.3.0.dev0+1738.ge7c1ef71d8
numpy : 1.22.0.dev0+4.gb283e1632
pytz : 2021.1
dateutil : 2.8.1
pip : 21.1.2
setuptools : 46.1.3
Cython : None
pytest : 6.2.4
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.6.3
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.23.1
pandas_datareader: None
bs4 : 4.9.3
bottleneck : None
fsspec : 2021.05.0+16.g07df543
fastparquet : 0.6.3
gcsfs : None
matplotlib : 3.4.2
numexpr : 2.7.3
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 4.0.0
pyxlsb : None
s3fs : 2021.05.0
scipy : 1.6.3
sqlalchemy : 1.3.23
tables : 3.6.1
tabulate : None
xarray : 0.18.2
xlrd : None
xlwt : None
numba : 0.53.1
The text was updated successfully, but these errors were encountered: