Skip to content

Commit

Permalink
Fix: Corrected column names expectation
Browse files Browse the repository at this point in the history
  • Loading branch information
HemanthM005 committed Apr 15, 2024
1 parent 4023e9f commit 7a09dc1
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 7a09dc1

Please sign in to comment.