Skip to content

Commit

Permalink
More readable error with unsortable index column
Browse files Browse the repository at this point in the history
Fixes ydataai#1567 by raising a better error message pointing out when a column has an unsortable index.
  • Loading branch information
saulshanabrook authored and fabclmnt committed Apr 5, 2024
1 parent 28ee3da commit efecb13
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ def render_common(config: Settings, summary: dict) -> dict:
n_extreme_obs = config.n_extreme_obs
n_freq_table_max = config.n_freq_table_max

if "value_counts_index_sorted" not in summary:
raise ValueError(f"column {summary['varname']!r} has an unsortable index")

template_variables = {
# TODO: with nan
"freq_table_rows": freq_table(
Expand Down

0 comments on commit efecb13

Please sign in to comment.