Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data Table = Table [String] [Column]
- data Column = Column [String] [Value]
- data Value
- buildTable :: [String] -> [[String]] -> [[Value]] -> Table
- crossJoinTable :: Table -> Table -> Table
- filterTable :: Column -> Table -> Table
- sortTable :: [Column] -> Table -> Table
- byTable :: [Column] -> Table -> [Table]
- emptyTable :: Table -> Table
- columnNames :: Table -> [([String], Column)]
- columnValue :: Column -> [Value]
- showColumn :: Column -> [String]
- applyOp :: (Value -> Value) -> Column -> Column
- applyInOp :: (Value -> Value -> Value) -> Column -> Column -> Column
- class Boolable a where
Documentation
A single table of data
Representation of data in tables
Instances
Enum Value Source # | |
Floating Value Source # | |
Num Value Source # | |
Fractional Value Source # | |
Integral Value Source # | |
Real Value Source # | |
Defined in Lsql.Csv.Core.Tables toRational :: Value -> Rational # | |
RealFrac Value Source # | |
Show Value Source # | |
Eq Value Source # | |
Ord Value Source # | |
Boolable Value Source # | |
:: [String] | Names of the table |
-> [[String]] | Names of columns |
-> [[Value]] | Rows of the table |
-> Table | Result table |
Makes table out of rows of Value
filterTable :: Column -> Table -> Table Source #
Filters out rows, where Column is false. The rows, where Column is true, are kept.
byTable :: [Column] -> Table -> [Table] Source #
Splits the table into multiple tables so that rows of columns at first argument are at each table the same and number of tables is minimal. (factorization)
emptyTable :: Table -> Table Source #
Returns table with same metadata as original table, but no data (no rows).
showColumn :: Column -> [String] Source #
Converts column to list of string from its data
applyOp :: (Value -> Value) -> Column -> Column Source #
Function for applying single argument function to Column