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

A DataFrame column of eltype "Date" changes to "Arrow.Datestamp" after reading it from a saved feather file #99

Open
mwsohn opened this issue Oct 3, 2018 · 1 comment

Comments

@mwsohn
Copy link

mwsohn commented Oct 3, 2018

Has this been reported as an issue before? Is there a way to get around this issue?

@ExpandingMan
Copy link
Collaborator

ExpandingMan commented Oct 4, 2018

You can just use convert on the Arrow types.

I do agree that the current behavior can be a little bit awkward, I've been planning on improving it at some point but unfortunately there's quite a bit of ambiguity in how this would be done.

So, what's going on here, is that Feather only officially supports saving dates and times in the arrow date and time formats. It would be trivial to instead use the Julia format, but this would make Julia feathers incompatible with other languages. Therefore, I decided to automatically convert only Date, Time, and DateTime (incidentally, see #98).

It's quite clear what the best default behavior would be for loading. Certainly Julia Dates types are infinitely more useful than the Arrow ones, but we also don't necessarily want to allocate a converted array.

I think my prefered behavior is to have a special type of Arrow array that wraps the raw ones and converts types on demand. I haven't implemented this yet, but, when I do, we'll probably make columns use these wrappers by default.

In the meantime you can of course convert the Arrow types.

(Also, our documentation really sucks regardless! We definitely need to improve it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants