| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
DataFrame.Schema
Description
The runtime schema surface for the dataframe ecosystem: the Schema
tag, its element types, and builders to describe a frame's columns by name.
Re-exported so callers never reach into DataFrame.Internal.Schema.
Synopsis
- newtype Schema = Schema {}
- data SchemaType where
- SType :: forall a. (Columnable a, Read a) => Proxy a -> SchemaType
- schemaType :: (Columnable a, Read a) => SchemaType
- makeSchema :: [(Text, SchemaType)] -> Schema
- class RuntimeSchema (cols :: [(Symbol, Type)]) where
Documentation
Logical schema of a DataFrame: a mapping from column names to their
element types (SchemaType).
Constructors
| Schema | |
Fields
| |
Instances
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"
makeSchema :: [(Text, SchemaType)] -> Schema Source #
Construct a Schema from a list of (columnName, schemaType) pairs.
class RuntimeSchema (cols :: [(Symbol, Type)]) where Source #
The runtime Schema behind a type-level schema — names and element
types — so a reader can project to a schema's columns and skip inference for
them in one step.
Every column type must have a Read instance, which Columnable does not
imply; that is what lets the names carry their types across to a reader.
Examples
>>>:set -XTypeApplications -XDataKinds>>>elements (runtimeSchema @'[ '("n", Int)])fromList [("n",Int)]
Methods
Instances
| RuntimeSchema ('[] :: [(Symbol, Type)]) Source # | |
Defined in DataFrame.Internal.Schema Methods | |
| (KnownSymbol name, Columnable a, Read a, RuntimeSchema rest) => RuntimeSchema ('(name, a) ': rest) Source # | |
Defined in DataFrame.Internal.Schema Methods | |