Slice not working on year column that is int
Opened this issue · 0 comments
ezmiller commented
See here:
| :Passengers | :Date | :Year |
|------------:|------------|---------:|
| 112 | 1949-01-01 | 1949 |
| 118 | 1949-02-01 | 1949 |
| 132 | 1949-03-01 | 1949 |
| 129 | 1949-04-01 | 1949 |
| 121 | 1949-05-01 | 1949 |
| 135 | 1949-06-01 | 1949 |
| 148 | 1949-07-01 | 1949 |
| 148 | 1949-08-01 | 1949 |
| 136 | 1949-09-01 | 1949 |
| 119 | 1949-10-01 | 1949 |
(-> prepped-data
(tc/add-column :Year
(fn [ds]
(map #(.getYear %) (:Date ds))))
(tct/index-by :Year)
(tct/slice 1949 1950)
)
This errors:
Time unit of
from
does not match index time unit: :int32
Something's wrong in the way slice is parsing the argument types here. Could be that there is a mismatch between an :int64 and :int32?