read

smile.read
object read

Data loading utilities.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
read.type

Members list

Value members

Concrete methods

def apply(file: String): AnyRef

Reads a serialized object from a file.

Reads a serialized object from a file.

Attributes

def apply(file: Path): AnyRef

Reads a serialized object from a file.

Reads a serialized object from a file.

Attributes

def arff(file: String): DataFrame

Reads an ARFF file.

Reads an ARFF file.

Attributes

def arff(file: Path): DataFrame

Reads an ARFF file.

Reads an ARFF file.

Attributes

def arrow(file: String): DataFrame

Reads an Apache Arrow file.

Reads an Apache Arrow file.

Attributes

def arrow(file: Path): DataFrame

Reads an Apache Arrow file.

Reads an Apache Arrow file.

Attributes

def avro(file: String): DataFrame

Reads an Apache Avro file using its embedded writer schema.

Reads an Apache Avro file using its embedded writer schema.

Attributes

def avro(file: Path): DataFrame

Reads an Apache Avro file using its embedded writer schema.

Reads an Apache Avro file using its embedded writer schema.

Attributes

def avro(file: String, schema: InputStream): DataFrame

Reads an Apache Avro file.

Reads an Apache Avro file.

Attributes

def avro(file: String, schema: String): DataFrame

Reads an Apache Avro file.

Reads an Apache Avro file.

Attributes

def avro(file: Path, schema: InputStream): DataFrame

Reads an Apache Avro file.

Reads an Apache Avro file.

Attributes

def avro(file: Path, schema: Path): DataFrame

Reads an Apache Avro file.

Reads an Apache Avro file.

Attributes

def csv(file: String, delimiter: String = ..., header: Boolean = ..., quote: Char = ..., escape: Char = ..., comment: Char = ..., schema: StructType = ...): DataFrame

Reads a CSV file.

Reads a CSV file.

Attributes

def csv(file: Path, delimiter: String, header: Boolean, quote: Char, escape: Char, comment: Char, schema: StructType): DataFrame

Reads a CSV file.

Reads a CSV file.

Attributes

def csv(file: String, format: CSVFormat, schema: StructType): DataFrame

Reads a CSV file.

Reads a CSV file.

Attributes

def csv(file: Path, format: CSVFormat, schema: StructType): DataFrame

Reads a CSV file.

Reads a CSV file.

Attributes

def data(path: String, format: String = ..., limit: Int = ...): DataFrame

Reads a data file. Infers the data format by the file name extension.

Reads a data file. Infers the data format by the file name extension.

Value parameters

format

the optional file format specification. For csv files, it is such as delimiter=\t,header=true,comment=#,escape=,quote=". For json files, it is the file mode (single-line or multi-line). For avro files, it is the path to the schema file.

limit

the number of records to read.

path

the input file path.

Attributes

Returns

the data frame.

def data(path: Path, format: String): DataFrame

Reads a data file. Infers the data format by the file name extension.

Reads a data file. Infers the data format by the file name extension.

Value parameters

format

the optional file format specification.

path

the input file path.

Attributes

Returns

the data frame.

def data(path: Path, format: String, limit: Int): DataFrame

Reads a data file. Infers the data format by the file name extension.

Reads a data file. Infers the data format by the file name extension.

Value parameters

format

the optional file format specification.

limit

the number of records to read.

path

the input file path.

Attributes

Returns

the data frame.

def data(path: Path): DataFrame

Reads a data file. Infers the data format by the file name extension.

Reads a data file. Infers the data format by the file name extension.

Value parameters

path

the input file path.

Attributes

Returns

the data frame.

def data(path: Path, limit: Int): DataFrame

Reads a limited number of records from a data file.

Reads a limited number of records from a data file.

Value parameters

limit

the number of records to read.

path

the input file path.

Attributes

Returns

the data frame.

def jdbc(rs: ResultSet): DataFrame

Reads a JDBC query result to a data frame.

Reads a JDBC query result to a data frame.

Attributes

def json(file: String): DataFrame

Reads a JSON file.

Reads a JSON file.

Attributes

def json(file: Path): DataFrame

Reads a JSON file.

Reads a JSON file.

Attributes

def json(file: String, mode: Mode, schema: StructType): DataFrame

Reads a JSON file.

Reads a JSON file.

Attributes

def json(file: Path, mode: Mode, schema: StructType): DataFrame

Reads a JSON file.

Reads a JSON file.

Attributes

def libsvm(file: String): SparseDataset[Integer]

Reads a LivSVM file.

Reads a LivSVM file.

Attributes

def libsvm(file: Path): SparseDataset[Integer]

Reads a LivSVM file.

Reads a LivSVM file.

Attributes

def parquet(file: String): DataFrame

Reads an Apache Parquet file.

Reads an Apache Parquet file.

Attributes

def parquet(file: Path): DataFrame

Reads an Apache Parquet file.

Reads an Apache Parquet file.

Attributes

def sas(file: String): DataFrame

Reads a SAS7BDAT file.

Reads a SAS7BDAT file.

Attributes

def sas(file: Path): DataFrame

Reads a SAS7BDAT file.

Reads a SAS7BDAT file.

Attributes

def wavefront(file: String): (Array[Array[Double]], Array[Array[Int]])

Reads a Wavefront OBJ file.

Reads a Wavefront OBJ file.

Attributes

def wavefront(file: Path): (Array[Array[Double]], Array[Array[Int]])

Reads a Wavefront OBJ file. The OBJ file format is a simple format of 3D geometry including the position of each vertex, the UV position of each texture coordinate vertex, vertex normals, and the faces that make each polygon defined as a list of vertices, and texture vertices. Vertices are stored in a counter-clockwise order by default, making explicit declaration of face normals unnecessary. OBJ coordinates have no units, but OBJ files can contain scale information in a human-readable comment line.

Reads a Wavefront OBJ file. The OBJ file format is a simple format of 3D geometry including the position of each vertex, the UV position of each texture coordinate vertex, vertex normals, and the faces that make each polygon defined as a list of vertices, and texture vertices. Vertices are stored in a counter-clockwise order by default, making explicit declaration of face normals unnecessary. OBJ coordinates have no units, but OBJ files can contain scale information in a human-readable comment line.

Note that we parse only vertex and face elements. All other information ignored.

Value parameters

file

the file path

Attributes

Returns

a tuple of vertex array and edge array.