public void Can_Create_DataFrame_From_List_Of_Generic_objects() { List <Record> testRecords = new List <Record>() { new Record { Name = "Test rec1", Timestamp = "Now1", Value = 10 }, new Record { Name = "Test rec2", Timestamp = "Now2", Value = 20 }, new Record { Name = "Test rec3", Timestamp = "Now3", Value = 30 }, }; var res = FrameReflectionUtils.ConvertRecordSequence <Record>(testRecords); Assert.AreEqual(3, res.ColumnKeys.Count()); Assert.AreEqual(testRecords.Count, res.RowCount); }
public static DataFrame <int, string> FromRecords <T>(IEnumerable <T> values) { //TODO add support for generic row indexes return(FrameReflectionUtils.ConvertRecordSequence <T>(values)); }