prehsept-0.6.6.6: PRECEPT, but in Haskell.
Safe HaskellNone
LanguageHaskell2010

Data.Frame

Description

A module for storing Tabular Data as Tensors

Synopsis

Documentation

data DataFrame a Source #

Data Frame

Constructors

DataFrame 

Fields

Instances

Instances details
Functor DataFrame Source #

Functor instance for Mapping over values

Instance details

Defined in Data.Frame

Methods

fmap :: (a -> b) -> DataFrame a -> DataFrame b #

(<$) :: a -> DataFrame b -> DataFrame a #

Show a => Show (DataFrame a) Source # 
Instance details

Defined in Data.Frame

nRows :: DataFrame Tensor -> Int Source #

Number of Rows in DataFrame

nCols :: DataFrame Tensor -> Int Source #

Number of Columns in DataFrame

fromFile' :: [String] -> FilePath -> IO (DataFrame Tensor) Source #

Load Tensor from file and construct DataFrame with given Header

fromFile :: FilePath -> IO (DataFrame Tensor) Source #

Load Tensor from file and construct DataFrame with default Header

lookup :: [String] -> DataFrame Tensor -> DataFrame Tensor Source #

Look up columns

(??) :: DataFrame Tensor -> String -> Tensor infixr 5 Source #

Shorthand for looking up a single key

rowSelect' :: [Int] -> DataFrame Tensor -> DataFrame Tensor Source #

Lookup Rows by index

rowSelect :: Tensor -> DataFrame Tensor -> DataFrame Tensor Source #

Lookup Rows by index

rowFilter :: Tensor -> DataFrame Tensor -> DataFrame Tensor Source #

Filter Rows by condtion

sort :: Bool -> String -> DataFrame Tensor -> DataFrame Tensor Source #

Sort Data Frame Ascending or Descending

rowDrop :: Tensor -> DataFrame Tensor -> DataFrame Tensor Source #

Drop given Rows from Data Frame

rowDrop' :: [Int] -> DataFrame Tensor -> DataFrame Tensor Source #

Drop given Rows from Data Frame

idxNan :: DataFrame Tensor -> Tensor Source #

Row index of all NaNs and Infs in Data Frame

dropNan :: DataFrame Tensor -> DataFrame Tensor Source #

Drop all Rows with NaNs and Infs (just calls idxNan and rowDrop)

update :: [String] -> Tensor -> DataFrame Tensor -> DataFrame Tensor Source #

Update given columns with new values (Tensor dimensions must match)

union :: DataFrame Tensor -> DataFrame Tensor -> DataFrame Tensor Source #

Union of two data frames

insert :: [String] -> Tensor -> DataFrame Tensor -> DataFrame Tensor Source #

Add columns with data

join :: DataFrame Tensor -> DataFrame Tensor -> DataFrame Tensor Source #

Join 2 DataFrames, columns must line up

concat :: [DataFrame Tensor] -> DataFrame Tensor Source #

Concatenate a list of Data Frames

sampleIO :: Int -> Bool -> DataFrame Tensor -> IO (DataFrame Tensor) Source #

Take n Random samples from Data Frame

shuffleIO :: DataFrame Tensor -> IO (DataFrame Tensor) Source #

Shuffle all rows

trainTestSplit :: [String] -> [String] -> Float -> DataFrame Tensor -> (Tensor, Tensor, Tensor, Tensor) Source #

Split a dataframe according to a given ratio