scicloj / tablecloth.time

Tools for the processing and manipulation of time-series data in Clojure.
Other
18 stars 1 forks source link

Support slice by integers #17

Closed ezmiller closed 3 years ago

ezmiller commented 3 years ago

Problem

There are some situations in which we may want to slice time in terms of an integer (or long). For example, dtype-next's date time has a function long-temporal-field that converts datetime datatypes to longs.

Solution

Just check to see if the to/from keys are ints, and if so pass the key through without any conversion.

How to test

  1. Check the logic of the new test added [here]().
  2. Run the test.

Also in this PR

  1. Some of the tests were broken because I'd not been using ds-equal (silly oversight).
  2. I fixed the tests and removed ds-equal because dataset equality now seems to have been fixed.
ezmiller commented 3 years ago

Thank you for the review @rsiddharthan.