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

copy does not copy to standard Julia Types #495

Open
schlichtanders opened this issue Jan 18, 2024 · 5 comments
Open

copy does not copy to standard Julia Types #495

schlichtanders opened this issue Jan 18, 2024 · 5 comments

Comments

@schlichtanders
Copy link

While the documentation says that a copy would ensure to have normal Julia Types

df = copy(DataFrame(Arrow.Table(file))): Build a DataFrame, where the columns are regular in-memory vectors (specifically, Base.Vectors and/or PooledVectors). This requires that you have enough memory to load the entire DataFrame into memory.

this is not the case

image

@Moelf
Copy link
Contributor

Moelf commented Jan 18, 2024

maybe that's because result_old[!, "workers"] is not a ::DataFrame?

@schlichtanders
Copy link
Author

Interesting, could be, but then, why are only DataFrames supported for copy and not regular Arrays?

@Moelf
Copy link
Contributor

Moelf commented Jan 24, 2024

Because you extracted just a column, which is not a data frame, so copy specialized for data frame doesn't work

@ericphanson
Copy link
Member

I think the other answer is because (if I understand correctly) it's a DataFrames.jl feature, not an Arrow.jl feature, it's just documented here because it's a common ask

@ericphanson
Copy link
Member

Maybe collect is what's desired here, for materializing a column into a Vector? Naively collect should be "iterate this collection into an Array", though I haven't tried it in this case

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

3 participants