This repository has been archived by the owner on Jun 27, 2024. It is now read-only.
arrow files
#36
-
A technical question: How do we convert .csv files (or a wrangled R data frame) into .arrow files? |
Beta Was this translation helpful? Give feedback.
Answered by
palday
Sep 14, 2023
Replies: 2 comments 2 replies
-
Piggy-backing on this question, is it possible to transfer Arrow table objects directly between R/Julia sessions via RCall (since R also has the arrow package)? For example, what I'd hoped would work: using RCall
using SMLP2023
R"library(arrow)"
R"$(SMLP2023.dataset(:kb07))"
ERROR: MethodError: no method matching sexpclass(::Arrow.Table) |
Beta Was this translation helpful? Give feedback.
1 reply
-
An example conversion from CSV to Arrow using Julia would look like: using Arrow
using CSV
using DataFrames
csv_path = "some_file.csv"
# read in the data and convert it to a dataframe
df = CSV.read(csv_path, DataFrame)
# do stuff ....
# write out the dataframe as an Arrow table
arrow_path = "some_file.arrow"
Arrow.write(arrow_path, df) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ebruevcen
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An example conversion from CSV to Arrow using Julia would look like: