DataFrameOps

smile.data.DataFrameOps
case class DataFrameOps(data: DataFrame)

Pimped data frame with Scala style methods.

Value parameters

data

a data frame.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def drop(range: Range): DataFrame

Returns a new DataFrame without given column indices.

Returns a new DataFrame without given column indices.

Attributes

def exists(p: Tuple => Boolean): Boolean

Tests if a predicate holds for at least one row of data frame.

Tests if a predicate holds for at least one row of data frame.

Attributes

def filter(p: Tuple => Boolean): DataFrame

Selects all rows which satisfy a predicate.

Selects all rows which satisfy a predicate.

Attributes

def find(p: Tuple => Boolean): Optional[Tuple]

Finds the first row satisfying a predicate.

Finds the first row satisfying a predicate.

Attributes

def forall(p: Tuple => Boolean): Boolean

Tests if a predicate holds for all rows of data frame.

Tests if a predicate holds for all rows of data frame.

Attributes

def foreach[U](p: Tuple => U): Unit

Applies a function for its side-effect to every row.

Applies a function for its side-effect to every row.

Attributes

def groupBy[K](f: Tuple => K): Map[K, DataFrame]

Partitions the DataFrame into a map of DataFrames according to some discriminator function.

Partitions the DataFrame into a map of DataFrames according to some discriminator function.

Type parameters

K

the type of keys returned by the discriminator function.

Value parameters

f

the discriminator function.

Attributes

Returns

A map from keys to DataFrames

def map[U](p: Tuple => U): Iterable[U]

Builds a new data collection by applying a function to all rows.

Builds a new data collection by applying a function to all rows.

Attributes

def of(range: Range): DataFrame

Returns a new data frame with row indexing.

Returns a new data frame with row indexing.

Attributes

def partition(p: Tuple => Boolean): (DataFrame, DataFrame)

Partitions this DataFrame in two according to a predicate.

Partitions this DataFrame in two according to a predicate.

Value parameters

p

the predicate on which to partition.

Attributes

Returns

a pair of DataFrames: the first DataFrame consists of all elements that satisfy the predicate p and the second DataFrame consists of all elements that don't. The relative order of the elements in the resulting DataFramess is the same as in the original DataFrame.

def select(range: Range): DataFrame

Selects a new DataFrame with given column indices.

Selects a new DataFrame with given column indices.

Attributes

def toJSON: JsArray

Converts the tuple to a JSON array.

Converts the tuple to a JSON array.

Attributes

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product