dataframe-0.7.0.0: A fast, safe, and intuitive DataFrame library.
Safe HaskellNone
LanguageHaskell2010

DataFrame.Internal.DataFrame

Synopsis

Documentation

data DataFrame Source #

Constructors

DataFrame 

Fields

Instances

Instances details
Monoid DataFrame Source # 
Instance details

Defined in DataFrame.Operations.Merge

Semigroup DataFrame Source #

Vertically merge two dataframes using shared columns. Columns that exist in only one dataframe are padded with Nothing.

Instance details

Defined in DataFrame.Operations.Merge

Show DataFrame Source # 
Instance details

Defined in DataFrame.Internal.DataFrame

NFData DataFrame Source # 
Instance details

Defined in DataFrame.Internal.DataFrame

Methods

rnf :: DataFrame -> () #

Eq DataFrame Source # 
Instance details

Defined in DataFrame.Internal.DataFrame

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

toMarkdownTable :: DataFrame -> Text Source #

For showing the dataframe as markdown in notebooks.

empty :: DataFrame Source #

O(1) Creates an empty dataframe

getColumn :: Text -> DataFrame -> Maybe Column Source #

Safely retrieves a column by name from the dataframe.

Returns Nothing if the column does not exist.

Examples

Expand
>>> getColumn "age" df
Just (UnboxedColumn ...)
>>> getColumn "nonexistent" df
Nothing

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

Expand

null :: DataFrame -> Bool Source #

Checks if the dataframe is empty (has no columns).

Returns True if the dataframe has no columns, False otherwise. Note that a dataframe with columns but no rows is not considered null.