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

add transpose(df, src_namescol, dst_namescol) #2420

Closed
bkamins opened this issue Sep 9, 2020 · 2 comments · Fixed by #2447
Closed

add transpose(df, src_namescol, dst_namescol) #2420

bkamins opened this issue Sep 9, 2020 · 2 comments · Fixed by #2447

Comments

@bkamins
Copy link
Member

bkamins commented Sep 9, 2020

This should transpose the contents of a DataFrame except src_namescol which should be converted to column names, while dst_namescol should be a first column name in the target data frame holding the names of columns before transposing.

@tbeason
Copy link
Contributor

tbeason commented Sep 19, 2020

Not sure if this is going to be helpful for whoever tackles this, but I have a function

transposedf(df,col) = unstack(stack(df,Not(col)),:variable, col,:value)

that I use semi-often right now. I think it maybe provides the imagined functionality but it only transposes on one column.

@bkamins
Copy link
Member Author

bkamins commented Sep 19, 2020

Thank you for posting your approach.

The key difficulty with this issue is to find a most efficient way to transpose. I have not looked into it yet, as it is non urgent.

@bkamins bkamins mentioned this issue Sep 20, 2020
@kescobo kescobo mentioned this issue Sep 21, 2020
3 tasks
@bkamins bkamins linked a pull request Sep 21, 2020 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants