Created
May 8, 2021 14:57
-
-
Save kvnkho/e911bbfb07eb95d67bb83717ebf25880 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandera as pa | |
price_check = pa.DataFrameSchema({ | |
"Price": pa.Column(pa.Int, pa.Check.in_range(min_value=5,max_value=20)), | |
}) | |
# schema: * | |
def price_validation(df:pd.DataFrame) -> pd.DataFrame: | |
price_check.validate(df) | |
return df | |
price_validation(df) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment