Skip to content

Commit

Permalink
Sort categories in categorical filter.
Browse files Browse the repository at this point in the history
  • Loading branch information
carschno committed Dec 5, 2024
1 parent ecac556 commit f907dba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tempo_embeddings/visualization/jscatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def _category_field_filter(

if field not in self._df.columns:
raise ValueError(f"'{field}' does not exist in the data.")
options = self._df[field].dropna().unique().tolist()
options = sorted(self._df[field].dropna().unique().tolist())

if field in self._df.columns and 1 < len(options) <= 50:
selector = widgets.SelectMultiple(
Expand Down

0 comments on commit f907dba

Please sign in to comment.