read_parquet | R Documentation |
Converts the contents of the named Parquet file to a R data frame.
read_parquet(file, col_select = NULL, options = parquet_options())
file |
Path to a Parquet file. It may also be an R connection,
in which case it first reads all data from the connection, writes
it into a temporary file, then reads the temporary file, and
deletes it. The connection might be open, it which case it must be
a binary connection. If it is not open, then |
col_select |
Columns to read. It can be a numeric vector of column
indices, or a character vector of column names. It is an error to
select the same column multiple times. The order of the columns in
the result is the same as the order in |
options |
Nanoparquet options, see |
A data.frame
with the file's contents.
See write_parquet()
to write Parquet files,
nanoparquet-types for the R <-> Parquet type mapping.
See read_parquet_info()
, for general information,
read_parquet_schema()
for information about the
columns, and read_parquet_metadata()
for the complete metadata.
file_name <- system.file("extdata/userdata1.parquet", package = "nanoparquet")
parquet_df <- nanoparquet::read_parquet(file_name)
print(str(parquet_df))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.