Skip to content

Commit

Permalink
Add pandas support for _config dict on data_asset
Browse files Browse the repository at this point in the history
  • Loading branch information
jcampbell committed Jul 24, 2019
1 parent 0a690a5 commit 64ab69e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions great_expectations/dataset/pandas_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,16 @@

import inspect
import json
import re
from datetime import datetime #, timedelta # Add for case of testing timedelta types
import logging
import io
from datetime import datetime
from functools import wraps
import jsonschema
import sys
import numpy as np
import pandas as pd
from dateutil.parser import parse
from scipy import stats
from six import PY3, integer_types, string_types
from numbers import Number

from .dataset import Dataset
from great_expectations.data_asset.util import DocInherit, parse_result_format
Expand All @@ -25,6 +21,7 @@

logger = logging.getLogger(__name__)


class MetaPandasDataset(Dataset):
"""MetaPandasDataset is a thin layer between Dataset and PandasDataset.
Expand Down Expand Up @@ -292,6 +289,7 @@ class PandasDataset(MetaPandasDataset, pd.DataFrame):
_internal_names = pd.DataFrame._internal_names + [
'_batch_kwargs',
'_expectation_suite',
'_config',
'caching',
'default_expectation_args',
'discard_subset_failing_expectations'
Expand All @@ -310,7 +308,7 @@ def __finalize__(self, other, method=None, **kwargs):
self._initialize_expectations(other.get_expectation_suite(
discard_failed_expectations=False,
discard_result_format_kwargs=False,
discard_include_configs_kwargs=False,
discard_include_config_kwargs=False,
discard_catch_exceptions_kwargs=False))
# If other was coerced to be a PandasDataset (e.g. via _constructor call during self.copy() operation)
# then it may not have discard_subset_failing_expectations set. Default to self value
Expand Down

0 comments on commit 64ab69e

Please sign in to comment.