Custom Expectations for Pandas

Hello Everyone,

I am following the guide on how to create a column pair map expectations, everything seems to work fine except for the Testing part.

None of my test cases are getting passed, I checked the metric code multiple times by developing a separate file to check the logic replicating the inputs and the output is as expected.

def check_conditions(x, condition) -> bool:
    return (x[0], x[1]) in condition.items()

def _pandas(column_A, column_B, condition):
    df = concat([column_A, column_B], axis=1)
    return df.apply(lambda x: check_conditions(x, condition), axis=1)


column A  = [1, 1, 2, 1, 2]
column B = ["UK", "UK", "US", "UK", "US"]
condition = {1: "UK", 2: "US"}


0     True
1     True
2     True
3     True
4     True
dtype: bool

But it seems to not work only with the expectation code. Can someone please help me with this.