Reorder columns in a deadline box

What is the best way to reorder columns in a deedle frame? For example, if I have a deedle df frame with columns height , Name and phone , but I need it in the order Name , phone and height .

+4
source share
1 answer

Deedle has a RealignRows extension method , but it turns out that we do not have RealignColumns . This is an omission, and if you send PR to Deedle by adding this, it will be awesome!

It can be implemented by viewing a series of columns, rearranging the columns and turning them back into a data frame. In C #, it looks like this:

 Frame.FromColumns(df.Columns.Realign(new[] { "key 1", "key 2" })); 
+3
source

All Articles