I have a pandas data frame where the 'combined_id' column is basically a combination of the first two columns. I want to create the combined_id column such that the smaller number comes before the larger one. I know I can swap around the first two columns to be listed in order of smallest/largest, but I want the order of the first two cols to remain as they are.
what I have:
Student1 Student2 combined_id
id/USER321 id/USER329 id/USER321_USER329
id/USER123 id/USER123 id/USER123_USER123
id/USER439 id/USER122 id/USER439_USER122
id/USER999 id/USER333 id/USER999_USER333
Desired
Student1 Student2 combined_id
id/USER321 id/USER329 id/USER321_USER329
id/USER123 id/USER123 id/USER123_USER123
id/USER439 id/USER122 id/USER122_USER439
id/USER999 id/USER333 id/USER333_USER999
