ts_shape.features.stats.numeric_stats
¤
Classes:
-
NumericStatistics
–Provides class methods to calculate statistics on numeric columns in a pandas DataFrame.
NumericStatistics
¤
NumericStatistics(dataframe: DataFrame, column_name: str = 'systime')
Bases: Base
Provides class methods to calculate statistics on numeric columns in a pandas DataFrame.
Parameters:
-
dataframe
¤DataFrame
) –The DataFrame to be processed.
-
column_name
¤str
, default:'systime'
) –The column to sort by. Default is 'systime'. If the column is not found or is not a time column, the class will attempt to detect other time columns.
Methods:
-
coefficient_of_variation
–Calculate the coefficient of variation of the column.
-
column_iqr
–Calculate the interquartile range of the column.
-
column_kurtosis
–Calculate the kurtosis of a specified column.
-
column_mad
–Calculate the mean absolute deviation of the column.
-
column_max
–Calculate the maximum value of a specified column.
-
column_mean
–Calculate the mean of a specified column.
-
column_median
–Calculate the median of a specified column.
-
column_min
–Calculate the minimum value of a specified column.
-
column_quantile
–Calculate a specific quantile of the column.
-
column_range
–Calculate the range of the column.
-
column_skewness
–Calculate the skewness of a specified column.
-
column_std
–Calculate the standard deviation of a specified column.
-
column_sum
–Calculate the sum of a specified column.
-
column_variance
–Calculate the variance of a specified column.
-
describe
–Provide a statistical summary for numeric columns in the DataFrame.
-
get_dataframe
–Returns the processed DataFrame.
-
standard_error_mean
–Calculate the standard error of the mean for the column.
-
summary_as_dataframe
–Returns a DataFrame with comprehensive numeric statistics for the specified column.
-
summary_as_dict
–Returns a dictionary with comprehensive numeric statistics for the specified column.
Source code in src/ts_shape/utils/base.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
|
coefficient_of_variation
classmethod
¤
Calculate the coefficient of variation of the column.
Source code in src/ts_shape/features/stats/numeric_stats.py
76 77 78 79 80 |
|
column_iqr
classmethod
¤
Calculate the interquartile range of the column.
Source code in src/ts_shape/features/stats/numeric_stats.py
61 62 63 64 |
|
column_kurtosis
classmethod
¤
Calculate the kurtosis of a specified column.
Source code in src/ts_shape/features/stats/numeric_stats.py
46 47 48 49 |
|
column_mad
classmethod
¤
Calculate the mean absolute deviation of the column.
Source code in src/ts_shape/features/stats/numeric_stats.py
71 72 73 74 |
|
column_max
classmethod
¤
Calculate the maximum value of a specified column.
Source code in src/ts_shape/features/stats/numeric_stats.py
36 37 38 39 |
|
column_mean
classmethod
¤
Calculate the mean of a specified column.
Source code in src/ts_shape/features/stats/numeric_stats.py
11 12 13 14 |
|
column_median
classmethod
¤
Calculate the median of a specified column.
Source code in src/ts_shape/features/stats/numeric_stats.py
16 17 18 19 |
|
column_min
classmethod
¤
Calculate the minimum value of a specified column.
Source code in src/ts_shape/features/stats/numeric_stats.py
31 32 33 34 |
|
column_quantile
classmethod
¤
Calculate a specific quantile of the column.
Source code in src/ts_shape/features/stats/numeric_stats.py
56 57 58 59 |
|
column_range
classmethod
¤
Calculate the range of the column.
Source code in src/ts_shape/features/stats/numeric_stats.py
66 67 68 69 |
|
column_skewness
classmethod
¤
Calculate the skewness of a specified column.
Source code in src/ts_shape/features/stats/numeric_stats.py
51 52 53 54 |
|
column_std
classmethod
¤
Calculate the standard deviation of a specified column.
Source code in src/ts_shape/features/stats/numeric_stats.py
21 22 23 24 |
|
column_sum
classmethod
¤
Calculate the sum of a specified column.
Source code in src/ts_shape/features/stats/numeric_stats.py
41 42 43 44 |
|
column_variance
classmethod
¤
Calculate the variance of a specified column.
Source code in src/ts_shape/features/stats/numeric_stats.py
26 27 28 29 |
|
describe
classmethod
¤
describe(dataframe: DataFrame) -> DataFrame
Provide a statistical summary for numeric columns in the DataFrame.
Source code in src/ts_shape/features/stats/numeric_stats.py
87 88 89 90 |
|
get_dataframe
¤
get_dataframe() -> DataFrame
Returns the processed DataFrame.
Source code in src/ts_shape/utils/base.py
34 35 36 |
|
standard_error_mean
classmethod
¤
Calculate the standard error of the mean for the column.
Source code in src/ts_shape/features/stats/numeric_stats.py
82 83 84 85 |
|
summary_as_dataframe
classmethod
¤
summary_as_dataframe(dataframe: DataFrame, column_name: str) -> DataFrame
Returns a DataFrame with comprehensive numeric statistics for the specified column.
Source code in src/ts_shape/features/stats/numeric_stats.py
118 119 120 121 122 |
|
summary_as_dict
classmethod
¤
Returns a dictionary with comprehensive numeric statistics for the specified column.
Source code in src/ts_shape/features/stats/numeric_stats.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
|