Skip to content
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

How to decompose a wide table into a long table #910

Closed
reckoner opened this issue Feb 23, 2021 · 1 comment
Closed

How to decompose a wide table into a long table #910

reckoner opened this issue Feb 23, 2021 · 1 comment
Labels

Comments

@reckoner
Copy link

When doing a groupby on a single categorical variable and on a single numerical variable, the groups are presented as a diagonal matrix, which is hard to look through when the diagonal is very long, which results in a very wide matrix. Is there a way to extract the diagonal entries of the result of the groupby into a single column?

Thanks!

@saulpw
Copy link
Owner

saulpw commented Feb 23, 2021

Hi @reckoner, if I understand you correctly, try melting the resulting sheet with Shift+M.

@saulpw saulpw closed this as completed Jun 25, 2021
@saulpw saulpw added question and removed wishlist labels Jun 25, 2021
@saulpw saulpw changed the title non-diagonal groupby results How to decompose a wide table into a long table Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants