Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Commit

Permalink
add has_nulls filter
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromedockes committed Apr 29, 2024
1 parent 8661936 commit 5da3e7f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/skrubview/_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,16 @@ def _get_column_filters(dataframe):
filters = {}
if sbd.shape(dataframe)[1] > 10:
filters["First 10"] = sbd.column_names(dataframe)[:10]
all_selectors = [s.all()]
for selector in [
s.all(),
s.has_nulls(),
s.numeric(),
~s.numeric(),
s.string(),
~s.string(),
s.categorical(),
~s.categorical(),
s.any_date(),
~s.any_date(),
]:
all_selectors.extend([selector, ~selector])
for selector in all_selectors:
filters[re.sub(r"^\((.*)\)$", r"\1", repr(selector))] = selector.expand(
dataframe
)
Expand Down

0 comments on commit 5da3e7f

Please sign in to comment.