Frames-0.1.9: Data frames For working with tabular data files

Safe HaskellNone
LanguageHaskell2010

Frames.Frame

Description

A Frame is a finite Int-indexed collection of rows.

Synopsis

Documentation

data Frame r Source #

A Frame is a finite collection of rows indexed by Int.

Constructors

Frame 

Fields

Instances

Monad Frame Source # 

Methods

(>>=) :: Frame a -> (a -> Frame b) -> Frame b #

(>>) :: Frame a -> Frame b -> Frame b #

return :: a -> Frame a #

fail :: String -> Frame a #

Functor Frame Source # 

Methods

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

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

Applicative Frame Source # 

Methods

pure :: a -> Frame a #

(<*>) :: Frame (a -> b) -> Frame a -> Frame b #

(*>) :: Frame a -> Frame b -> Frame b #

(<*) :: Frame a -> Frame b -> Frame a #

Foldable Frame Source # 

Methods

fold :: Monoid m => Frame m -> m #

foldMap :: Monoid m => (a -> m) -> Frame a -> m #

foldr :: (a -> b -> b) -> b -> Frame a -> b #

foldr' :: (a -> b -> b) -> b -> Frame a -> b #

foldl :: (b -> a -> b) -> b -> Frame a -> b #

foldl' :: (b -> a -> b) -> b -> Frame a -> b #

foldr1 :: (a -> a -> a) -> Frame a -> a #

foldl1 :: (a -> a -> a) -> Frame a -> a #

toList :: Frame a -> [a] #

null :: Frame a -> Bool #

length :: Frame a -> Int #

elem :: Eq a => a -> Frame a -> Bool #

maximum :: Ord a => Frame a -> a #

minimum :: Ord a => Frame a -> a #

sum :: Num a => Frame a -> a #

product :: Num a => Frame a -> a #

Monoid (Frame r) Source #

The Monoid instance for Frame provides a mechanism for vertical concatenation of Frames. That is, f1 <> f2 will return a new Frame with the rows of f1 followed by the rows of f2.

Methods

mempty :: Frame r #

mappend :: Frame r -> Frame r -> Frame r #

mconcat :: [Frame r] -> Frame r #

type FrameRec rs = Frame (Record rs) Source #

A Frame whose rows are Record values.

boxedFrame :: Foldable f => f r -> Frame r Source #

Build a Frame from any Foldable. This simply uses a boxed Vector to hold each row. If you have a collection of Records, consider using toFrame.

zipFrames :: FrameRec rs -> FrameRec rs' -> FrameRec (rs ++ rs') Source #

Horizontal Frame concatenation. That is, zipFrames f1 f2 will return a Frame with as many rows as the smaller of f1 and f2 whose rows are the result of appending the columns of f2 to those of f1.