Data-Forge FS

Index

Functions

asCSV

  • asCSV<IndexT, ValueT>(this: IDataFrame<IndexT, ValueT>, options?: ICSVOutputOptions): ICsvSerializer
  • Type parameters

    • IndexT

    • ValueT

    Parameters

    • this: IDataFrame<IndexT, ValueT>
    • Optional options: ICSVOutputOptions

    Returns ICsvSerializer

    Returns a ICsvSerializer that represents the dataframe for serialization in the CSV format. Call writeFile or writeFileSync to output the CSV data to a text file.

asJSON

  • asJSON<IndexT, ValueT>(this: IDataFrame<IndexT, ValueT>): IJsonSerializer
  • Type parameters

    • IndexT

    • ValueT

    Parameters

    • this: IDataFrame<IndexT, ValueT>

    Returns IJsonSerializer

    Returns a IJsonSerializer that represents the dataframe for serialization in the JSON format. Call writeFile or writeFileSync to output the JSON data to a text file.

readFile

  • Parameters

    • filePath: string

    Returns IAsyncFileReader

    Returns an object that represents the file. Use parseCSV or parseJSON to deserialize to a DataFrame.

readFileSync

  • Parameters

    • filePath: string

    Returns ISyncFileReader

    Returns an object that represents the file. Use parseCSV or parseJSON to deserialize to a DataFrame.