Reputation: 1108
How can I achieve this in Deedle.
Pandas: df['Name'] = 'abc'
Deedle: df?Name = "abc"
doesn't work - it expects a series.
Upvotes: 2
Views: 690
Reputation: 243061
Given a sample data frame with one column:
let df =
frame [ "One" => series [ 1 => 1.1; 2 => 2.2 ] ]
To add a new column, you will need to create a series with values for all rows first. Then you can add it to the frame in very similar way to pandas:
df?Two <- series [ for k in df.RowKeys -> k => "abc" ]
Upvotes: 4