Int Column Profile

Int profile analysis for individual col within structured profiling.

class dataprofiler.profilers.int_column_profile.IntColumn(name, options=None)

Bases: dataprofiler.profilers.numerical_column_stats.NumericStatsMixin, dataprofiler.profilers.base_column_profilers.BaseColumnPrimitiveTypeProfiler

Integer column profile mixin with of numerical stats.

Represents a column in the dataset which is an integer column.

Initialize column base properties and itself.

Parameters
  • name (String) – Name of the data

  • options (IntOptions) – Options for the integer column

type = 'int'
report(remove_disabled_flag=False)

Return the report.

Parameters

remove_disabled_flag (boolean) – flag to determine if disabled options should be excluded in the report.

property profile

Return the profile of the column.

Returns

property data_type_ratio

Calculate the ratio of samples which match this data type.

Returns

ratio of data type

Return type

float

update(df_series)

Update the column profile.

Parameters

df_series (pandas.core.series.Series) – df series

Returns

None

col_type = None
diff(other_profile, options=None)

Find the differences for several numerical stats.

Parameters

other_profile (NumericStatsMixin Profile) – profile to find the difference with

Returns

the numerical stats differences

Return type

dict

static is_float(x)

Return True if x is float.

For “0.80” this function returns True For “1.00” this function returns True For “1” this function returns True

Parameters

x (str) – string to test

Returns

if is float or not

Return type

bool

static is_int(x)

Return True if x is integer.

For “0.80” This function returns False For “1.00” This function returns True For “1” this function returns True

Parameters

x (str) – string to test

Returns

if is integer or not

Return type

bool

property kurtosis

Return kurtosis value.

property mean

Return mean value.

property median

Estimate the median of the data.

Returns

the median

Return type

float

property median_abs_deviation

Get median absolute deviation estimated from the histogram of the data.

Subtract bin edges from the median value Fold the histogram to positive and negative parts around zero Impose the two bin edges from the two histogram Calculate the counts for the two histograms with the imposed bin edges Superimpose the counts from the two histograms Interpolate the median absolute deviation from the superimposed counts

Returns

median absolute deviation

property mode

Find an estimate for the mode[s] of the data.

Returns

the mode(s) of the data

Return type

list(float)

static np_type_to_type(val)

Convert numpy variables to base python type variables.

Parameters

val (numpy type or base type) – value to check & change

Return val

base python type

Rtype val

int or float

property skewness

Return skewness value.

property stddev

Return stddev value.

property variance

Return variance.