Skip to content

Commit

Permalink
fix: ts typeset allowing constant values
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbarros committed May 23, 2023
1 parent f3f7ef0 commit 74ee2c3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ydata_profiling/model/typeset.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,11 @@ def get_relations() -> Sequence[TypeRelation]:
@series_not_empty
@series_handle_nulls
def contains_op(series: pd.Series, state: dict) -> bool:
return pdt.is_numeric_dtype(series) and not pdt.is_bool_dtype(series)
return (
pdt.is_numeric_dtype(series)
and not pdt.is_bool_dtype(series)
and series.nunique() > 1
)

types = {Unsupported, Boolean, Numeric, Text, Categorical, DateTime}
if config.vars.path.active:
Expand Down

0 comments on commit 74ee2c3

Please sign in to comment.