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

DataFrame.Operations.Statistics

Synopsis

Documentation

frequencies :: Text -> DataFrame -> DataFrame Source #

Show a frequency table for a categorical feaure.

Examples:

ghci> df <- D.readCsv "./data/housing.csv"

ghci> D.frequencies "ocean_proximity" df

----------------------------------------------------------------------------
index |   Statistic    | <1H OCEAN | INLAND | ISLAND | NEAR BAY | NEAR OCEAN
------|----------------|-----------|--------|--------|----------|-----------
 Int  |      Text      |    Any    |  Any   |  Any   |   Any    |    Any
------|----------------|-----------|--------|--------|----------|-----------
0     | Count          | 9136      | 6551   | 5      | 2290     | 2658
1     | Percentage (%) | 44.26%    | 31.74% | 0.02%  | 11.09%   | 12.88%

mean :: Text -> DataFrame -> Maybe Double Source #

Calculates the mean of a given column as a standalone value.

median :: Text -> DataFrame -> Maybe Double Source #

Calculates the median of a given column as a standalone value.

standardDeviation :: Text -> DataFrame -> Maybe Double Source #

Calculates the standard deviation of a given column as a standalone value.

skewness :: Text -> DataFrame -> Maybe Double Source #

Calculates the skewness of a given column as a standalone value.

variance :: Text -> DataFrame -> Maybe Double Source #

Calculates the variance of a given column as a standalone value.

interQuartileRange :: Text -> DataFrame -> Maybe Double Source #

Calculates the inter-quartile range of a given column as a standalone value.

correlation :: Text -> Text -> DataFrame -> Maybe Double Source #

Calculates the Pearson's correlation coefficient between two given columns as a standalone value.

sum :: (Columnable a, Num a, Unbox a) => Text -> DataFrame -> Maybe a Source #

Calculates the sum of a given column as a standalone value.

summarize :: DataFrame -> DataFrame Source #

Descriptive statistics of the numeric columns.

roundTo :: Int -> Double -> Double Source #

Round a Double to Specified Precision