Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slice not working on year column that is int #57

Open
ezmiller opened this issue Dec 5, 2021 · 0 comments
Open

Slice not working on year column that is int #57

ezmiller opened this issue Dec 5, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ezmiller
Copy link
Contributor

ezmiller commented Dec 5, 2021

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?

@ezmiller ezmiller added the bug Something isn't working label Dec 5, 2021
@ezmiller ezmiller self-assigned this Dec 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant