-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
59 changed files
with
4,249 additions
and
3,029 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.. _autoinspection: | ||
|
||
================================================================================ | ||
Autoinspection | ||
================================================================================ | ||
|
||
It can be very convenient to have great expectations automatically review a \ | ||
dataset and suggest expectations that may be appropriate. Currently, there \ | ||
a very basic, but easily extensible, autoinspection capability available. | ||
|
||
Dataset objects have an `autoinspect` method which allows you to provide a \ | ||
function that will evaluate a dataset object and add expectations to it. \ | ||
By default `autoinspect` will call the autoinspect function \ | ||
:func:`columns_exist <great_expectations.dataset.autoinspect.columns_exist>` \ | ||
which will add an `expect_column_to_exist` expectation for each column \ | ||
currently present on the dataset. | ||
|
||
To implement additional autoinspection functions, you simply take a single \ | ||
parameter, a Dataset, and evaluate and add expectations to that object. | ||
|
||
|
||
.. code-block:: python | ||
>> import great_expectations as ge | ||
>> df = ge.dataset.PandasDataset({"col": [1, 2, 3, 4, 5]}) | ||
>> df.autoinspect(ge.dataset.autoinspect.columns_exist) | ||
>> df.get_expectations_config() | ||
{'dataset_name': None, | ||
'meta': {'great_expectations.__version__': '0.4.4__develop'}, | ||
'expectations': [ | ||
{'expectation_type': 'expect_column_to_exist', | ||
'kwargs': {'column': 'col'} | ||
}] | ||
} |
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
from .util import * | ||
from great_expectations import dataset | ||
from great_expectations.data_context import get_data_context | ||
from .file_expectations import * | ||
|
||
from .version import __version__ |
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
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
Oops, something went wrong.