Skip to content

Commit

Permalink
Merge pull request #30 from andyvanyperenAM/bugfix/ix_iloc
Browse files Browse the repository at this point in the history
idx is a variable name and not an index
  • Loading branch information
Julio Antonio Soto authored Nov 7, 2019
2 parents b5f33c0 + 23b55d5 commit 8ab7d27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spark_df_profiling/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 8ab7d27

Please sign in to comment.