Skip to content

Commit

Permalink
fix for numeric values in filter
Browse files Browse the repository at this point in the history
  • Loading branch information
nickzoic committed Jul 30, 2024
1 parent 786e7fd commit b3429ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions countess/plugins/filter.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Iterable

import pandas as pd
from pandas.api.types import is_numeric_dtype

from countess import VERSION
from countess.core.logger import Logger
Expand Down Expand Up @@ -95,6 +96,8 @@ def process(self, data: pd.DataFrame, source: str, logger: Logger) -> Iterable[p
column = param["column"].value
operator = param["operator"].value
value = param["value"].value
if is_numeric_dtype(data[column]):
value = float(value)

if operator == "equals":
series = data[column].eq(value)
Expand Down

0 comments on commit b3429ee

Please sign in to comment.