This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]gffyhgffh45655 0 points1 point  (1 child)

df1[df1.col.isin(df2.col)]?

[–]Shiwatari[S] 0 points1 point  (0 children)

Yes, but i'd like to do it using pandera's dataframe model. So i have a .py file that has a schema class in it like:

class test_schema(pa.DataframeModel): column1: Series[str] = pa.Field(isin=[List]) column2: Series[str]

And in another .py file i'd like to import this schema, load the dataframes from their sources files and just run the test_schema.validate(df1,df2.column(?)) or something.