def _get_part_dep_one(self, fields: list, masterbar=None) -> pd.DataFrame:
    "\n        Function calculate partial dependency for column in fields.\n        Fields is a list of lists of what columns we want to test. The inner items are treated as connected fields.\n        For ex. fields = [['Store','StoreType']] mean that Store and StoreType is treated as one entity\n        (it's values are substitute as a pair, not as separate values)\n        coef is useful when we don't want to deal with all the variants, but only with most common\n        "
    NAN_SUBST = '###na###'
    cont_vars = self._get_cont_columns()
    fields = listify(fields)
    (coef, is_sorted, use_log, use_int) = (self.coef, self.is_sorted, self.use_log, self.use_int)
    dep_name = self._get_dep_var()
    df = self._cont_into_buckets(df_init=self.df, CONT_COLS=cont_vars)
    field_min_occ = self._get_field_uniq_x_coef(df=df, fields=fields, coef=coef)
    df[fields] = df[fields].fillna(NAN_SUBST)
    occs = df.groupby(fields).size().reset_index(name='Times').sort_values(['Times'], ascending=False)
    occs[fields] = occs[fields].replace(to_replace=NAN_SUBST, value=np.nan)
    df[fields] = df[fields].replace(to_replace=NAN_SUBST, value=np.nan)
    occs = occs[(occs['Times'] >= field_min_occ)]
    df_copy = df.merge(occs[fields]).copy()
    frame = []
    ln = len(occs)
    if (ln > 0):
        for (_, row) in progress_bar(occs.iterrows(), total=ln, parent=masterbar):
            record = []
            for fld in fields:
                df_copy[fld] = row[fld]
            preds = self._predict_df(df=df_copy)
            preds = (np.exp(np.mean(preds)) if (use_log == True) else np.mean(preds))
            preds = (int(preds) if (use_int == True) else preds)
            for fld in fields:
                record.append(row[fld])
            record.append(preds)
            record.append(row['Times'])
            frame.append(record)
    out = pd.DataFrame(frame, columns=(fields + [dep_name, 'times']))
    median = out[dep_name].median()
    out[dep_name] /= median
    if (is_sorted == True):
        out = out.sort_values(by=dep_name, ascending=False)
    return out
Function calculate partial dependency for column in fields.
Fields is a list of lists of what columns we want to test. The inner items are treated as connected fields.
For ex. fields = [['Store','StoreType']] mean that Store and StoreType is treated as one entity
(it's values are substitute as a pair, not as separate values)
coef is useful when we don't want to deal with all the variants, but only with most common
def _get_part_dep_one(self, fields: list, masterbar=None) -> pd.DataFrame:
    "\n        Function calculate partial dependency for column in fields.\n        Fields is a list of lists of what columns we want to test. The inner items are treated as connected fields.\n        For ex. fields = [['Store','StoreType']] mean that Store and StoreType is treated as one entity\n        (it's values are substitute as a pair, not as separate values)\n        coef is useful when we don't want to deal with all the variants, but only with most common\n        "
    NAN_SUBST = '###na###'
    cont_vars = self._get_cont_columns()
    fields = listify(fields)
    (coef, is_sorted, use_log, use_int) = (self.coef, self.is_sorted, self.use_log, self.use_int)
    dep_name = self._get_dep_var()
    df = self._cont_into_buckets(df_init=self.df, CONT_COLS=cont_vars)
    field_min_occ = self._get_field_uniq_x_coef(df=df, fields=fields, coef=coef)
    df[fields] = df[fields].fillna(NAN_SUBST)
    occs = df.groupby(fields).size().reset_index(name='Times').sort_values(['Times'], ascending=False)
    occs[fields] = occs[fields].replace(to_replace=NAN_SUBST, value=np.nan)
    df[fields] = df[fields].replace(to_replace=NAN_SUBST, value=np.nan)
    occs = occs[(occs['Times'] >= field_min_occ)]
    df_copy = df.merge(occs[fields]).copy()
    frame = []
    ln = len(occs)
    if (ln > 0):
        for (_, row) in progress_bar(occs.iterrows(), total=ln, parent=masterbar):
            record = []
            for fld in fields:
                df_copy[fld] = row[fld]
            preds = self._predict_df(df=df_copy)
            preds = (np.exp(np.mean(preds)) if (use_log == True) else np.mean(preds))
            preds = (int(preds) if (use_int == True) else preds)
            for fld in fields:
                record.append(row[fld])
            record.append(preds)
            record.append(row['Times'])
            frame.append(record)
    out = pd.DataFrame(frame, columns=(fields + [dep_name, 'times']))
    median = out[dep_name].median()
    out[dep_name] /= median
    if (is_sorted == True):
        out = out.sort_values(by=dep_name, ascending=False)
    return out