henne90gen / elm-pandas-visualization / DataFrame

Elm representation of a pandas DataFrame.


type alias DataFrame a =
{ schema : Maybe Schema
, data : List a 
}

The DataFrame type containing the schema of the data and the data itself

create : List a -> DataFrame a

Creates a DataFrame from the supplied data

dataFrameDecoder : Json.Decode.Decoder a -> Json.Decode.Decoder (DataFrame a)

Decodes a JSON serialized DataFrame


type XValueMapper a
    = TimeMapper (a -> Time.Posix)
    | ValueMapper (a -> Basics.Float)

Decides how the values are mapped to the x-axis


type alias YValueMapper a =
a -> Basics.Float

Decides how the values are mapped to the y-axis

Helper Methods

map : (a -> b) -> DataFrame a -> DataFrame b

Maps a function over each row of a DataFrame

filter : (a -> Basics.Bool) -> DataFrame a -> DataFrame a

Filter rows by the specified filter function

length : DataFrame a -> Basics.Int

Gives back the number of rows in the DataFrame