Skip to content

BUG: Grouper should have a dropna attribute #36620

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

Closed
3 tasks done
arw2019 opened this issue Sep 25, 2020 · 0 comments · Fixed by #36604
Closed
3 tasks done

BUG: Grouper should have a dropna attribute #36620

arw2019 opened this issue Sep 25, 2020 · 0 comments · Fixed by #36604
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member
Milestone

Comments

@arw2019
Copy link
Member

arw2019 commented Sep 25, 2020

  • 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.


xref #35612

Code Sample, a copy-pastable example

In [1]: import pandas as pd 
   ...: df = pd.DataFrame({"A": [0, 0, 1, None], "B": [10, 2, 10, None]}) 
   ...: gb = df.groupby('A', dropna=False)                                     

In [2]: gb.dropna                                                              
Out[2]: False

In [3]: gb.grouper.dropna                                                      
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-4d8081f9c78e> in <module>
----> 1 gb.grouper.dropna

AttributeError: 'BaseGrouper' object has no attribute 'dropna'

Problem description

Now that we support a dropna argument to DataFrameGroupBy and SeriesGroupBy we need to be able to use it in Grouper (#35751)

Output of pd.show_versions()

INSTALLED VERSIONS

commit : f34a56b
python : 3.7.7.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0-48-generic
Version : #52-Ubuntu SMP Thu Sep 10 10:58:49 UTC 2020
machine : x86_64
processor :
byteorder : little
LC_ALL : C.UTF-8
LANG : C.UTF-8
LOCALE : en_US.UTF-8

pandas : 1.2.0.dev0+484.gf34a56b4d
numpy : 1.18.5
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 45.2.0.post20200210
Cython : 0.29.21
pytest : 5.4.3
hypothesis : 5.19.0
sphinx : 3.1.1
blosc : None
feather : None
xlsxwriter : 1.2.9
lxml.etree : 4.4.1
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.16.1
pandas_datareader: None
bs4 : 4.9.1
bottleneck : 1.3.2
fsspec : 0.7.4
fastparquet : 0.4.0
gcsfs : 0.6.2
matplotlib : 3.2.1
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.4
pandas_gbq : None
pyarrow : 0.16.0
pytables : None
pyxlsb : None
s3fs : 0.4.2
scipy : 1.5.0
sqlalchemy : 1.3.18
tables : 3.6.1
tabulate : 0.8.7
xarray : 0.15.1
xlrd : 1.2.0
xlwt : 1.3.0
numba : 0.50.1

@arw2019 arw2019 added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 25, 2020
@jreback jreback added this to the 1.2 milestone Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Needs Triage Issue that has not been reviewed by a pandas team member
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants