Skip to content

Commit

Permalink
Merge pull request #42 from factly/fix/column_names_issue
Browse files Browse the repository at this point in the history
Fix: Corrected column names expectation
  • Loading branch information
paul-tharun authored Apr 23, 2024
2 parents 4023e9f + 7a09dc1 commit 101bb90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Binary file modified .DS_Store
Binary file not shown.
15 changes: 6 additions & 9 deletions app/expectations/custom_expectations.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,11 @@ def expect_column_names_to_be_in_specific_pattern(
include_meta=True,
find_columns=False,
):
boolean_list = pd.Series(column_list.columns).apply(
lambda x: True if pattern.match(str(x)) else False
boolean_list = (
pd.Series(column_list.columns)
.apply(lambda x: True if pattern.match(str(x)) else False)
.all()
)
# improper_column_list = [
# column
# for column, boolean in zip(column_list.columns, boolean_list)
# if not boolean
# ]
# logging.info(boolean_list.all())
boolean_list = pd.Series([boolean_list] * len(column_list))

return boolean_list.all()
return boolean_list

0 comments on commit 101bb90

Please sign in to comment.