Try to fix groupby_valuecount
State: closed

- [BUG: fixed subset parameter of DataFrameGroupBy.value_counts has no effect] closes #46383  


Labels:
name: Bug
name: Groupby
name: Algos
description: Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff
name: Stale

Comments:
Hello @DongqiWu! Thanks for opening this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:

* In the file [`pandas/core/groupby/generic.py`](https://github.com/pandas-dev/pandas/blob/59bcdcf0069ed6a1c881e4af589dd87243264ddf/pandas/core/groupby/generic.py):

> [Line 1747:1](https://github.com/pandas-dev/pandas/blob/59bcdcf0069ed6a1c881e4af589dd87243264ddf/pandas/core/groupby/generic.py#L1747): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace

* In the file [`pandas/tests/groupby/test_groupby_valuecount.py`](https://github.com/pandas-dev/pandas/blob/59bcdcf0069ed6a1c881e4af589dd87243264ddf/pandas/tests/groupby/test_groupby_valuecount.py):

> [Line 26:9](https://github.com/pandas-dev/pandas/blob/59bcdcf0069ed6a1c881e4af589dd87243264ddf/pandas/tests/groupby/test_groupby_valuecount.py#L26): [E123](https://duckduckgo.com/?q=pep8%20E123) closing bracket does not match indentation of opening bracket's line
> [Line 35:1](https://github.com/pandas-dev/pandas/blob/59bcdcf0069ed6a1c881e4af589dd87243264ddf/pandas/tests/groupby/test_groupby_valuecount.py#L35): [E302](https://duckduckgo.com/?q=pep8%20E302) expected 2 blank lines, found 1
> [Line 42:9](https://github.com/pandas-dev/pandas/blob/59bcdcf0069ed6a1c881e4af589dd87243264ddf/pandas/tests/groupby/test_groupby_valuecount.py#L42): [E123](https://duckduckgo.com/?q=pep8%20E123) closing bracket does not match indentation of opening bracket's line
> [Line 43:5](https://github.com/pandas-dev/pandas/blob/59bcdcf0069ed6a1c881e4af589dd87243264ddf/pandas/tests/groupby/test_groupby_valuecount.py#L43): [E265](https://duckduckgo.com/?q=pep8%20E265) block comment should start with '# '
> [Line 60:1](https://github.com/pandas-dev/pandas/blob/59bcdcf0069ed6a1c881e4af589dd87243264ddf/pandas/tests/groupby/test_groupby_valuecount.py#L60): [E302](https://duckduckgo.com/?q=pep8%20E302) expected 2 blank lines, found 1
> [Line 67:9](https://github.com/pandas-dev/pandas/blob/59bcdcf0069ed6a1c881e4af589dd87243264ddf/pandas/tests/groupby/test_groupby_valuecount.py#L67): [E123](https://duckduckgo.com/?q=pep8%20E123) closing bracket does not match indentation of opening bracket's line
> [Line 68:5](https://github.com/pandas-dev/pandas/blob/59bcdcf0069ed6a1c881e4af589dd87243264ddf/pandas/tests/groupby/test_groupby_valuecount.py#L68): [E265](https://duckduckgo.com/?q=pep8%20E265) block comment should start with '# '
> [Line 85:1](https://github.com/pandas-dev/pandas/blob/59bcdcf0069ed6a1c881e4af589dd87243264ddf/pandas/tests/groupby/test_groupby_valuecount.py#L85): [E265](https://duckduckgo.com/?q=pep8%20E265) block comment should start with '# '
> [Line 86:1](https://github.com/pandas-dev/pandas/blob/59bcdcf0069ed6a1c881e4af589dd87243264ddf/pandas/tests/groupby/test_groupby_valuecount.py#L86): [E302](https://duckduckgo.com/?q=pep8%20E302) expected 2 blank lines, found 1
> [Line 87:8](https://github.com/pandas-dev/pandas/blob/59bcdcf0069ed6a1c881e4af589dd87243264ddf/pandas/tests/groupby/test_groupby_valuecount.py#L87): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 88:12](https://github.com/pandas-dev/pandas/blob/59bcdcf0069ed6a1c881e4af589dd87243264ddf/pandas/tests/groupby/test_groupby_valuecount.py#L88): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 89:12](https://github.com/pandas-dev/pandas/blob/59bcdcf0069ed6a1c881e4af589dd87243264ddf/pandas/tests/groupby/test_groupby_valuecount.py#L89): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 90:30](https://github.com/pandas-dev/pandas/blob/59bcdcf0069ed6a1c881e4af589dd87243264ddf/pandas/tests/groupby/test_groupby_valuecount.py#L90): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 120:59](https://github.com/pandas-dev/pandas/blob/59bcdcf0069ed6a1c881e4af589dd87243264ddf/pandas/tests/groupby/test_groupby_valuecount.py#L120): [W292](https://duckduckgo.com/?q=pep8%20W292) no newline at end of file


This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.
@DongqiWu - are you interested in continuing this work?
Closing this PR as stale. @DongqiWu, if you like to continue just reply here and I'd be happy to reopen!