Skip to contents

Function extracts the content of a column from a python data set in order to allow further operations in R.

Usage

extract_column_from_py_dataset(py_dataset, column_name, format = "R")

Arguments

py_dataset

datasets.arrow_dataset.Dataset data set to extract the column from.

column_name

string Name of the column to extract.

format

string Format of the requested data.

  • "R" returns the data as a R object.

  • "torch" returns the data as PyTorch tensors.

  • "numpy" returns the data as numpy array.

Value

Returns a vector, matrix or array for format="R". In all other cases the requested format is returned.