dataframe-0.3.3.2: A fast, safe, and intuitive DataFrame library.
Safe HaskellNone
LanguageHaskell2010

DataFrame.Lazy.IO.CSV

Synopsis

Documentation

data ReadOptions Source #

Record for CSV read options.

Constructors

ReadOptions 

defaultOptions :: ReadOptions Source #

By default we assume the file has a header, we infer the types on read and we convert any rows with nullish objects into Maybe (safeRead).

readCsv :: FilePath -> IO DataFrame Source #

Reads a CSV file from the given path. Note this file stores intermediate temporary files while converting the CSV from a row to a columnar format.

readTsv :: FilePath -> IO DataFrame Source #

Reads a tab separated file from the given path. Note this file stores intermediate temporary files while converting the CSV from a row to a columnar format.

readSeparated :: Char -> ReadOptions -> FilePath -> IO (DataFrame, (Integer, Text, Int)) Source #

Reads a character separated file into a dataframe using mutable vectors.

fillColumns :: Int -> Char -> IOVector MutableColumn -> IOVector [(Int, Text)] -> Text -> Handle -> IO (Text, Int) Source #

Reads rows from the handle and stores values in mutable vectors.

writeValue :: IOVector MutableColumn -> IOVector [(Int, Text)] -> Int -> Int -> Text -> IO () Source #

Writes a value into the appropriate column, resizing the vector if necessary.

freezeColumn :: IOVector MutableColumn -> Vector [(Int, Text)] -> ReadOptions -> Int -> IO Column Source #

Freezes a mutable vector into an immutable one, trimming it to the actual row count.

countRows :: Char -> FilePath -> IO Int Source #

First pass to count rows for exact allocation

writeSeparated Source #

Arguments

:: Char

Separator

-> FilePath

Path to write to

-> DataFrame 
-> IO ()