fslaborg / Deedle

Easy to use .NET library for data and time series manipulation and for scientific programming
http://fslab.org/Deedle/
BSD 2-Clause "Simplified" License
924 stars 196 forks source link

Avoid iterating seq multiple times in Frame.ofRecords #406

Closed zyzhu closed 5 years ago

zyzhu commented 5 years ago

I would like to address the issue https://github.com/fslaborg/Deedle/issues/364

I simply converted seq into array to avoid Frame.ofRecords iterating seq multiple times. It avoids creating frame unintended by user. I also added a test cases using the sample in issue 364.

@tpetricek Are you ok with this temporary allocation?

zyzhu commented 5 years ago

@tpetricek I wonder what's the impact of my converting data to array in Frame.ofRecords. Will it affect project such as BigDeedle? Is there a better way of doing this? I want to find a middle ground to make result deterministic but not penalizing lazy loading too much.