Frames-0.6.1: 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 # 
Instance details

Defined in Frames.Frame

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 # 
Instance details

Defined in Frames.Frame

Methods

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

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

Applicative Frame Source # 
Instance details

Defined in Frames.Frame

Methods

pure :: a -> Frame a #

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

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

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

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

Foldable Frame Source # 
Instance details

Defined in Frames.Frame

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 #

Eq r => Eq (Frame r) Source # 
Instance details

Defined in Frames.Frame

Methods

(==) :: Frame r -> Frame r -> Bool #

(/=) :: Frame r -> Frame r -> Bool #

Semigroup (Frame r) Source # 
Instance details

Defined in Frames.Frame

Methods

(<>) :: Frame r -> Frame r -> Frame r #

sconcat :: NonEmpty (Frame r) -> Frame r #

stimes :: Integral b => b -> Frame r -> Frame r #

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.

Instance details

Defined in Frames.Frame

Methods

mempty :: Frame r #

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

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

NFData a => NFData (Frame a) Source # 
Instance details

Defined in Frames.ExtraInstances

Methods

rnf :: Frame a -> () #

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.