Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
172 views
in Technique[技术] by (71.8m points)

Is there a Python function to merge all rows in groupby dataframe into a single row with multiple columns?

I would like to group the whole dataframe by SR Nbr, and each row belonging to a given SR Nbr to be added at the end of the previous row. Basically, each Sr Nbr would only have one row with an increasing number of columns. Thank you.

This is the desired output. Here is the input and desired output

question from:https://stackoverflow.com/questions/66057316/is-there-a-python-function-to-merge-all-rows-in-groupby-dataframe-into-a-single

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...