API for get_type functions
`@property` methods for
* get_constants
* get_categoricals
* get_numerics
* get_uniques
* get_bools
@@ -253,6 +253,22 @@ class DataFrameSummary(object):
if column_type == self.TYPE_CONSTANT:
return self._get_constant_summary(column)
+ @property
+ def get_constants(self):
+ return self.df.columns[self.columns_stats.loc['types'] == 'constant']
+ @property
+ def get_categoricals(self):
+ return self.df.columns[self.columns_stats.loc['types'] == 'categorical']
+ @property
+ def get_numerics(self):
+ return self.df.columns[self.columns_stats.loc['types'] == 'numeric']
+ @property
+ def get_uniques(self):
+ return self.df.columns[self.columns_stats.loc['types'] == 'unique']
+ @property
+ def get_bools(self):
+ return self.df.columns[self.columns_stats.loc['types'] == 'bool']
+
def get_columns(self, df, usage, columns=None):
"""
Returns a `data_frame.columns`.
