TypedSeries

public struct TypedSeries<Element> : DataSeries
  • Declaration

    Swift

    public typealias Element = Element
  • Declaration

    Swift

    public func makeIterator() -> DataSeriesIterator<TypedSeries>
  • Declaration

    Swift

    public func prefetch(_ i: Int, streamContext: StreamContext?)
  • Declaration

    Swift

    public func next(_ streamContext: StreamContext?) -> Element?
  • Declaration

    Swift

    public var underestmiatedCount: Int { get }
  • Declaration

    Swift

    public let count: Int
  • Sample existing column to create a new dataframe.

    Declaration

    Swift

    public func sample<U>(size: Int, repeating: Int? = nil, sampler: @escaping ([Element]) -> U)
      -> DataFrame

    Parameters

    size

    How many rows to be sampled together.

    repeating

    Will we repeat the sampling to create more columns?

    sampler

    The sampling function, for example, averaging, max, first, last etc.

    Return Value

    A new dataframe.

  • Create a new column by applying some transformations on an existing column.

    Declaration

    Swift

    public func map<U>(_ mapper: @escaping (Element) -> U) -> DataFrame.UntypedSeries

Available where Element: AnyTensor

  • Combine tensors into one tensor. This is useful for GPU batching.

    Declaration

    Swift

    public func combine(size: Int, repeating: Int? = nil) -> DataFrame

    Parameters

    size

    How many tensors to group together.

    repeating

    How many new columns to be created.

    Return Value

    A new dataframe with combined tensors.

Available where Element == String

Available where Element == Int

Available where Element: AnyTensor