| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
DataFrame.Internal.Schema
Description
Runtime schema representation. The Template-Haskell deriveSchema splice
lives in DataFrame.Internal.Schema.TH so this module can be used from
packages that do not depend on template-haskell.
Synopsis
- data SchemaType where
- SType :: forall a. (Columnable a, Read a) => Proxy a -> SchemaType
- schemaType :: (Columnable a, Read a) => SchemaType
- newtype Schema = Schema {}
- makeSchema :: [(Text, SchemaType)] -> Schema
Documentation
data SchemaType where Source #
A runtime tag for a column’s element type.
Constructors
| SType :: forall a. (Columnable a, Read a) => Proxy a -> SchemaType | Constructor carrying a |
Instances
| Show SchemaType Source # | Show the underlying element type using Examples
|
Defined in DataFrame.Internal.Schema Methods showsPrec :: Int -> SchemaType -> ShowS # show :: SchemaType -> String # showList :: [SchemaType] -> ShowS # | |
| Eq SchemaType Source # | Two Examples
|
Defined in DataFrame.Internal.Schema | |
schemaType :: (Columnable a, Read a) => SchemaType Source #
Construct a SchemaType for the given a.
Examples
>>>:set -XTypeApplications>>>schemaType @T.Text == schemaType @T.TextTrue
>>>show (schemaType @Double)"Double"
Logical schema of a DataFrame: a mapping from column names to their
element types (SchemaType).
Constructors
| Schema | |
Fields
| |
Instances
makeSchema :: [(Text, SchemaType)] -> Schema Source #
Construct a Schema from a list of (columnName, schemaType) pairs.