Obtain summary statistics of column(s) including count, mean, median, mode, Q1, Q3, variance, standard deviation, correlation, and covariance in table format.

column_stats(data, columns)

Arguments

data

A data set from which columns will be selected

columns

A list of columns for which to obtain summary stats, correlation matrix, and covariance matrix (if > 1 column arguments used)

Value

three pd.DataFrames

Examples

column_stats(iris, c('Sepal.Length', 'Sepal.Width', 'Petal.Length'))
#> Warning: number of columns of result is not a multiple of vector length (arg 2)
#> [[1]]
#>              Count  Mean Median Mode  Q1  Q3   Var     Stdev
#> Sepal.Length   150 5.843   5.80  5.0 5.1 6.4 0.686 0.8280661
#> Sepal.Width    150 3.057   3.00  3.0 2.8 3.3 0.190 0.4358663
#> Petal.Length   150 3.758   4.35  1.4 1.5 1.6 5.100 3.1160000
#> 
#> [[2]]
#>              Sepal.Length Sepal.Width Petal.Length
#> Sepal.Length    0.6856935  -0.0424340    1.2743154
#> Sepal.Width    -0.0424340   0.1899794   -0.3296564
#> Petal.Length    1.2743154  -0.3296564    3.1162779
#> 
#> [[3]]
#>              Sepal.Length Sepal.Width Petal.Length
#> Sepal.Length    1.0000000  -0.1175698    0.8717538
#> Sepal.Width    -0.1175698   1.0000000   -0.4284401
#> Petal.Length    0.8717538  -0.4284401    1.0000000
#>