Psihiatr
Psihiatr

Reputation: 128

How to drop multiple columns in Deedle

I am trying to drop multiple columns from a Deedle Frame, however it seems that its C# API supports dropping only one column at a time:

df.DropColumn("a");

Something similar to this F# example will also work for me, but I have no Idea how to translate it to C#:

let df2 = df.Columns.[["a", "b", "c"]]

This should select only the specified columns into a new DF.

Upvotes: 1

Views: 221

Answers (1)

Psihiatr
Psihiatr

Reputation: 128

DataFrame subsetting in C# seems to work by passing a string array as a Columns array index:

var df2 = df.Columns[new string[] {"a","b","c"}];

Upvotes: 1

Related Questions