From 23b55d597e633d4effb9558bf50cc9718ef60f41 Mon Sep 17 00:00:00 2001 From: Andy Van Yperen-De Deyne Date: Thu, 7 Nov 2019 08:22:13 +0100 Subject: [PATCH] idx is a variable name and not an index line 636, there was a .ix[idx] replaced by .iloc[idx] but this was incorrect since idx is a variable name and not an index. --- spark_df_profiling/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spark_df_profiling/base.py b/spark_df_profiling/base.py index 29c5099..270f4c6 100644 --- a/spark_df_profiling/base.py +++ b/spark_df_profiling/base.py @@ -633,9 +633,9 @@ def format_row(freq, label, extra_class=''): messages.append(templates.messages[col].format(formatted_values, varname = formatters.fmt_varname(idx))) if row['type'] == 'CAT': - formatted_values['minifreqtable'] = freq_table(stats_object['freq'][idx], n_obs, stats_object['variables'].iloc[idx], + formatted_values['minifreqtable'] = freq_table(stats_object['freq'][idx], n_obs, stats_object['variables'].loc[idx], templates.template('mini_freq_table'), templates.template('mini_freq_table_row'), 3) - formatted_values['freqtable'] = freq_table(stats_object['freq'][idx], n_obs, stats_object['variables'].iloc[idx], + formatted_values['freqtable'] = freq_table(stats_object['freq'][idx], n_obs, stats_object['variables'].loc[idx], templates.template('freq_table'), templates.template('freq_table_row'), 20) if row['distinct_count'] > 50: messages.append(templates.messages['HIGH_CARDINALITY'].format(formatted_values, varname = formatters.fmt_varname(idx)))