Open ppatino opened 3 years ago
I realized I can also do row filtering by using:
frame.RealignRows(frame.RowKeys.Where(rk => rk == 0));
in which case the rows are appropriately filtered (in this case simply to index 0) AND the frame.ColumnTypes
appears to be correct after this (i.e. types are string
, int?
).
Issue description
I am running into an issue where a Frame is "losing" its column's initial data types when the Frame is filtered to only contain rows where the column's values are missing. Pardon the C#-isms in advance, I am using
Deedle
from C# code, but hopefully this is all clear.Steps to reproduce the issue
string
("Name" field) andint?
("Age" field).frame.ColumnTypes
directly after the frame is created below usingFrame.FromRecords
results in the expected types ofstring
andint?
being output.Person
records, I filter to index0
aka the "Alice" record where Age is null.filtered.ColumnTypes
produces an unexpected result of the "Age" column having a type ofSystem.Object
.What's the expected result?
ColumnTypes
pre and post-filtering should not change.What's the actual result?
System.Object
from whatever its previous, correct type was (in my example, after filtering, the type of theAge
column changes from typeof(Int32?) to typeof(Object).