great_expectations icon indicating copy to clipboard operation
great_expectations copied to clipboard

UserConfigurableProfiler skips date/decimal columns

Open mishbahr opened this issue 1 year ago • 0 comments

Describe the bug

When passing a Pandas dataframe containing date and decimal columns to the UserConfigurableProfiler, the expected output should include the "expect_column_values_to_be_in_type_list" expectation for every column. However, the expectation is skipped for the "date" and "decimal" columns.

To Reproduce

  1. Create a Pandas dataframe with date and decimal columns.
data = {
    "user_id": [1],
    "name": ["Clark Kent"],
    "dob": ["1980-05-06"],
    "is_hero": [True],
    "height": [6.1],
    "last_login": [pd.Timestamp("2023-01-01 08:00:00")],
    "balance": [Decimal("150.00")],
}
df = pd.DataFrame(data)
df["dob"] = pd.to_datetime(df["dob"]).dt.date
  1. Pass the dataframe to the UserConfigurableProfiler.

Expected behavior

The UserConfigurableProfiler should include the "expect_column_values_to_be_in_type_list" expectation for every column in the dataframe.

Environment (please complete the following information):

  • Operating System: Linux
  • Great Expectations Version: 0.18.8
  • Data Source: Pandas
  • Cloud environment: N/A

mishbahr avatar Feb 09 '24 10:02 mishbahr