| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
DataFrame.Internal.DataFrame
Synopsis
- data DataFrame = DataFrame {
- columns :: Vector Column
- columnIndices :: Map Text Int
- dataframeDimensions :: (Int, Int)
- derivingExpressions :: Map Text UExpr
- data GroupedDataFrame = Grouped {
- fullDataframe :: DataFrame
- groupedColumns :: [Text]
- valueIndices :: Vector Int
- offsets :: Vector Int
- rowToGroup :: Vector Int
- toMarkdownTable :: DataFrame -> Text
- asText :: DataFrame -> Bool -> Text
- empty :: DataFrame
- getColumn :: Text -> DataFrame -> Maybe Column
- unsafeGetColumn :: Text -> DataFrame -> Column
- null :: DataFrame -> Bool
Documentation
Constructors
| DataFrame | |
Fields
| |
data GroupedDataFrame Source #
A record that contains information about how and what
rows are grouped in the dataframe. This can only be used with
aggregate.
Constructors
| Grouped | |
Fields
| |
Instances
| Show GroupedDataFrame Source # | |
Defined in DataFrame.Internal.DataFrame Methods showsPrec :: Int -> GroupedDataFrame -> ShowS # show :: GroupedDataFrame -> String # showList :: [GroupedDataFrame] -> ShowS # | |
| Eq GroupedDataFrame Source # | |
Defined in DataFrame.Internal.DataFrame Methods (==) :: GroupedDataFrame -> GroupedDataFrame -> Bool # (/=) :: GroupedDataFrame -> GroupedDataFrame -> Bool # | |
toMarkdownTable :: DataFrame -> Text Source #
For showing the dataframe as markdown in notebooks.
getColumn :: Text -> DataFrame -> Maybe Column Source #
Safely retrieves a column by name from the dataframe.
Returns Nothing if the column does not exist.
Examples
>>>getColumn "age" dfJust (UnboxedColumn ...)
>>>getColumn "nonexistent" dfNothing
unsafeGetColumn :: Text -> DataFrame -> Column Source #
Retrieves a column by name from the dataframe, throwing an exception if not found.
This is an unsafe version of getColumn that throws ColumnNotFoundException
if the column does not exist. Use this when you are certain the column exists.
Throws
ColumnNotFoundException- if the column with the given name does not exist