Hello All
I need some help on what the best way would be to group multiple columns of the same table.
My table would have columns similar to the following:
Z 3 , X 1, Z 2, X 3, X 4, Y 1, X 2, Y 2, Z 1
I would like to group all the Xs, Ys and Zs together and in numeric order if possible. This is a condensed version of what I deal with which is usually on the order of hundreds of columns with varying group sizes required.
The easiest way I think would be to create a list based on the column names, then use the loc() feature to return the position of each similar column name. However, what would be the best way to use the group() command?
Any help on this problem is appreciated.
thanks!