def _cont_into_buckets(self, df_init, CONT_COLS):
    "\n        Categorical values can be easily distiguished one from another\n        But that doesn't work with continious values, we have to divede it's\n        values into buckets and then use all values in a bucket as a single value\n        that avarages the bucket. This way we convert cont feture into pseudo categorical\n        and are able to apply partial dependense analysis to it\n        "
    fields = self.fields
    df = df_init.copy()
    if is_in_list(values=fields, in_list=CONT_COLS):
        for col in which_elms(values=fields, in_list=CONT_COLS):
            edges = np.histogram_bin_edges(a=df[col].dropna(), bins='auto')
            for (x, y) in zip(edges[:], edges[1:]):
                df.loc[(((df[col] > x) & (df[col] < y)), col)] = ((x + y) / 2)
    return df
Categorical values can be easily distiguished one from another
But that doesn't work with continious values, we have to divede it's
values into buckets and then use all values in a bucket as a single value
that avarages the bucket. This way we convert cont feture into pseudo categorical
and are able to apply partial dependense analysis to it
def _cont_into_buckets(self, df_init, CONT_COLS):
    "\n        Categorical values can be easily distiguished one from another\n        But that doesn't work with continious values, we have to divede it's\n        values into buckets and then use all values in a bucket as a single value\n        that avarages the bucket. This way we convert cont feture into pseudo categorical\n        and are able to apply partial dependense analysis to it\n        "
    fields = self.fields
    df = df_init.copy()
    if is_in_list(values=fields, in_list=CONT_COLS):
        for col in which_elms(values=fields, in_list=CONT_COLS):
            edges = np.histogram_bin_edges(a=df[col].dropna(), bins='auto')
            for (x, y) in zip(edges[:], edges[1:]):
                df.loc[(((df[col] > x) & (df[col] < y)), col)] = ((x + y) / 2)
    return df