question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(DOC) A `string` passed to `groupby` is hard to understand based on current doc

See original GitHub issue

Code 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:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sanchiprakashcommented, Apr 6, 2019

is this still open? i would like to proceed with it.

0reactions
Nikhil1O1commented, Sep 9, 2020

I submitted a pull request with the issue concerned above. #36238 @jreback @BranYang

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found