I want to change the order of certain column in certain row. The dataframe looks like this.
movieStream | optin_1 | musicStream | optin_2 | DramaStream | optin_3 |
---|---|---|---|---|---|
netflix | yes | spotify | yes | hulu | yes |
netflix | yes | spotify | yes | hulu | yes |
hulu | no | netflix | yes | spotify | no |
netflix | yes | spotify | yes | hulu | yes |
I want to reorder the bold part along with the others in the same column like this:
movieStream | optin_1 | musicStream | optin_2 | DramaStream | optin_3 |
---|---|---|---|---|---|
netflix | yes | spotify | yes | hulu | yes |
netflix | yes | spotify | yes | hulu | yes |
netflix | yes | spotify | no | hulu | no |
netflix | yes | spotify | yes | hulu | yes |
I don't know it's specific index number...and I also don't how many mixed rows going to be in this Dataframe.