21 using System.Collections;
22 using System.Collections.Generic;
32 private readonly Lazy<int> _count;
33 private readonly Lazy<PyObject> _dataframe;
38 protected IEnumerable<T>
Data {
get; }
43 public int Count => _count.Value;
53 public DataHistory(IEnumerable<T> data, Lazy<PyObject> dataframe)
55 Data = data.Memoize();
56 _dataframe = dataframe;
58 _count =
new(() =>
Data.Count());
66 var builder =
new StringBuilder();
67 foreach (var dataPoint
in Data)
69 builder.AppendLine(dataPoint.ToString());
71 return builder.ToString();
79 return Data.GetEnumerator();
82 IEnumerator IEnumerable.GetEnumerator()