(DOC) A `string` passed to `groupby` is hard to understand based on current doc
See original GitHub issueCode Sample, a copy-pastable example if possible
From Here
For DataFrame objects, a string indicating a column to be used to group. Of course
df.groupby('A') is just syntactic sugar for df.groupby(df['A']), but
it makes life simpler
For DataFrame objects, a string indicating an index level to be used to group.
Problem description
These two sentences are in a kind of conflict with each other, until one read until she read the note below.
Expected Output
Reword to make it clear that a string may indicate column or index level
Output of pd.show_versions()
INSTALLED VERSIONS
------------------
commit: None
python: 3.5.3.final.0
python-bits: 64
OS: Darwin
OS-release: 16.6.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8
pandas: 0.21.0.dev+193.gb2b5dc32e pytest: 3.1.2 pip: 9.0.1 setuptools: 36.0.1 Cython: 0.25.2 numpy: 1.13.0 scipy: 0.19.0 xarray: None IPython: 6.0.0 sphinx: 1.6.2 patsy: 0.4.1 dateutil: 2.6.0 pytz: 2017.2 blosc: None bottleneck: 1.2.1 tables: None numexpr: 2.6.2 feather: None matplotlib: 2.0.2 openpyxl: None xlrd: None xlwt: None xlsxwriter: None lxml: None bs4: None html5lib: 0.9999999 sqlalchemy: None pymysql: None psycopg2: None jinja2: 2.9.6 s3fs: None pandas_gbq: None pandas_datareader: None
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
pandas GroupBy: Your Guide to Grouping Data in Python
In this tutorial, you'll learn how to work adeptly with the pandas GroupBy facility while mastering ways to manipulate, transform, ...
Read more >Group and Aggregate your Data Better using Pandas Groupby
Aggregation and grouping of Dataframes is accomplished in Python Pandas using “groupby()” and “agg()” functions. Apply max, min, count, distinct to groups.
Read more >python - How do I use itertools.groupby()? - Stack Overflow
What I'm trying to do is this: Take a list - in this case, the children of an objectified lxml element; Divide it...
Read more >GroupBy and Ungroup functions in Power Apps
The GroupBy function returns a table with records grouped together based on the values in one or more columns. Records in the same...
Read more >GROUP BY Clause | ClickHouse Docs
There's an additional way to run aggregation over a table. If a query contains table columns only inside aggregate functions, the GROUP BY...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
is this still open? i would like to proceed with it.
I submitted a pull request with the issue concerned above. #36238 @jreback @BranYang