I have a pandas df like this
id v1 v2 v3 v4
1 a a b b
2 x f f a
How can I order it with a based on values from a set such as
setorder = ('1','3','2','4')
yields
id v1 v3 v2 v4
1 a b a b
2 x f f a
Thanks
I have a pandas df like this
id v1 v2 v3 v4
1 a a b b
2 x f f a
How can I order it with a based on values from a set such as
setorder = ('1','3','2','4')
yields
id v1 v3 v2 v4
1 a b a b
2 x f f a
Thanks