Skip to content

Commit

Permalink
README changes for _df change
Browse files Browse the repository at this point in the history
  • Loading branch information
kunaljubce committed Jul 16, 2024
1 parent 1d33b91 commit 2fca007
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ quinn.validate_presence_of_columns(source_df, ["name", "age", "fun"])
Raises an exception unless `source_df` contains all the `StructFields` defined in the `required_schema`. By default, `ignore_nullable` is set to False, so exception will be raised even if column names and data types are matching but nullability conditions are mismatching.

```python
quinn.validate_schema(required_schema, _df=source_df)
quinn.validate_schema(required_schema, df_to_be_validated=source_df)
```

You can also set `ignore_nullable` to True, so the validation will happen only on column names and data types, not on nullability.

```python
quinn.validate_schema(required_schema, ignore_nullable=True, _df=source_df)
quinn.validate_schema(required_schema, ignore_nullable=True, df_to_be_validated=source_df)
```

> [!TIP]
> This function can also be used as a decorator to other functions that return a dataframe. This can help validate the schema of the returned df. When used as a decorator, you don't need to pass the `_df` argument as this validation is performed on the df returned by the base function on which the decorator is applied.
> This function can also be used as a decorator to other functions that return a dataframe. This can help validate the schema of the returned df. When used as a decorator, you don't need to pass the `df_to_be_validated` argument as this validation is performed on the df returned by the base function on which the decorator is applied.
>
> ```python
> @quinn.validate_schema(required_schema, ignore_nullable=True)
Expand Down

0 comments on commit 2fca007

Please sign in to comment.