Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions dataframely/columns/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,19 @@ def __init__(
this checks uniqueness for this column independently. Multiple columns
can each have `unique=True` without forming a composite constraint.
check: A custom rule or multiple rules to run for this column. This can be:

- A single callable that returns a non-aggregated boolean expression.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.

- A list of callables, where each callable returns a non-aggregated
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.

- A dictionary mapping rule names to callables, where each callable
returns a non-aggregated boolean expression.
returns a non-aggregated boolean expression.

All rule names provided here are given the prefix `"check_"`.
alias: An overwrite for this column's name which allows for using a column
name that is not a valid Python identifier. Especially note that setting
Expand Down
16 changes: 10 additions & 6 deletions dataframely/columns/any.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,19 @@ def __init__(
"""
Args:
check: A custom rule or multiple rules to run for this column. This can be:

- A single callable that returns a non-aggregated boolean expression.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.

- A list of callables, where each callable returns a non-aggregated
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.

- A dictionary mapping rule names to callables, where each callable
returns a non-aggregated boolean expression.
returns a non-aggregated boolean expression.

All rule names provided here are given the prefix `"check_"`.
alias: An overwrite for this column's name which allows for using a column
name that is not a valid Python identifier. Especially note that setting
Expand Down
16 changes: 10 additions & 6 deletions dataframely/columns/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,19 @@ def __init__(
this checks uniqueness for this column independently. Multiple columns
can each have `unique=True` without forming a composite constraint.
check: A custom rule or multiple rules to run for this column. This can be:

- A single callable that returns a non-aggregated boolean expression.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.

- A list of callables, where each callable returns a non-aggregated
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.

- A dictionary mapping rule names to callables, where each callable
returns a non-aggregated boolean expression.
returns a non-aggregated boolean expression.

All rule names provided here are given the prefix `"check_"`.
alias: An overwrite for this column's name which allows for using a column
name that is not a valid Python identifier. Especially note that setting
Expand Down
16 changes: 10 additions & 6 deletions dataframely/columns/categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,19 @@ def __init__(
this checks uniqueness for this column independently. Multiple columns
can each have `unique=True` without forming a composite constraint.
check: A custom rule or multiple rules to run for this column. This can be:

- A single callable that returns a non-aggregated boolean expression.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.

- A list of callables, where each callable returns a non-aggregated
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.

- A dictionary mapping rule names to callables, where each callable
returns a non-aggregated boolean expression.
returns a non-aggregated boolean expression.

All rule names provided here are given the prefix `"check_"`.
alias: An overwrite for this column's name which allows for using a column
name that is not a valid Python identifier. Especially note that setting
Expand Down
64 changes: 40 additions & 24 deletions dataframely/columns/datetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,19 @@ def __init__(
For example, a value `1mo` expects all dates to be on the first of the
month. Note that this setting does *not* affect the storage resolution.
check: A custom rule or multiple rules to run for this column. This can be:

- A single callable that returns a non-aggregated boolean expression.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.

- A list of callables, where each callable returns a non-aggregated
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.

- A dictionary mapping rule names to callables, where each callable
returns a non-aggregated boolean expression.
returns a non-aggregated boolean expression.

All rule names provided here are given the prefix `"check_"`.
alias: An overwrite for this column's name which allows for using a column
name that is not a valid Python identifier. Especially note that setting
Expand Down Expand Up @@ -207,15 +211,19 @@ def __init__(
For example, a value `1h` expects all times to be full hours. Note
that this setting does *not* affect the storage resolution.
check: A custom rule or multiple rules to run for this column. This can be:

- A single callable that returns a non-aggregated boolean expression.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.

- A list of callables, where each callable returns a non-aggregated
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.

- A dictionary mapping rule names to callables, where each callable
returns a non-aggregated boolean expression.
returns a non-aggregated boolean expression.

All rule names provided here are given the prefix `"check_"`.
alias: An overwrite for this column's name which allows for using a column
name that is not a valid Python identifier. Especially note that setting
Expand Down Expand Up @@ -357,15 +365,19 @@ def __init__(
`America/New_York`.
time_unit: Unit of time. Defaults to `us` (microseconds).
check: A custom rule or multiple rules to run for this column. This can be:

- A single callable that returns a non-aggregated boolean expression.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.

- A list of callables, where each callable returns a non-aggregated
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.

- A dictionary mapping rule names to callables, where each callable
returns a non-aggregated boolean expression.
returns a non-aggregated boolean expression.

All rule names provided here are given the prefix `"check_"`.
alias: An overwrite for this column's name which allows for using a column
name that is not a valid Python identifier. Especially note that setting
Expand Down Expand Up @@ -521,15 +533,19 @@ def __init__(
that this setting does *not* affect the storage resolution.
time_unit: Unit of time. Defaults to `us` (microseconds).
check: A custom rule or multiple rules to run for this column. This can be:

- A single callable that returns a non-aggregated boolean expression.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.

- A list of callables, where each callable returns a non-aggregated
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.

- A dictionary mapping rule names to callables, where each callable
returns a non-aggregated boolean expression.
returns a non-aggregated boolean expression.

All rule names provided here are given the prefix `"check_"`.
alias: An overwrite for this column's name which allows for using a column
name that is not a valid Python identifier. Especially note that setting
Expand Down
16 changes: 10 additions & 6 deletions dataframely/columns/decimal.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,19 @@ def __init__(
max_exclusive: Like `max` but exclusive. May not be specified if `max`
is specified and vice versa.
check: A custom rule or multiple rules to run for this column. This can be:

- A single callable that returns a non-aggregated boolean expression.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.

- A list of callables, where each callable returns a non-aggregated
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.

- A dictionary mapping rule names to callables, where each callable
returns a non-aggregated boolean expression.
returns a non-aggregated boolean expression.

All rule names provided here are given the prefix `"check_"`.
alias: An overwrite for this column's name which allows for using a column
name that is not a valid Python identifier. Especially note that setting
Expand Down
16 changes: 10 additions & 6 deletions dataframely/columns/enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,19 @@ def __init__(
this checks uniqueness for this column independently. Multiple columns
can each have `unique=True` without forming a composite constraint.
check: A custom rule or multiple rules to run for this column. This can be:

- A single callable that returns a non-aggregated boolean expression.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.

- A list of callables, where each callable returns a non-aggregated
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.

- A dictionary mapping rule names to callables, where each callable
returns a non-aggregated boolean expression.
returns a non-aggregated boolean expression.

All rule names provided here are given the prefix `"check_"`.
alias: An overwrite for this column's name which allows for using a column
name that is not a valid Python identifier. Especially note that setting
Expand Down
16 changes: 10 additions & 6 deletions dataframely/columns/float.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,19 @@ def __init__(
max_exclusive: Like `max` but exclusive. May not be specified if `max`
is specified and vice versa.
check: A custom rule or multiple rules to run for this column. This can be:

- A single callable that returns a non-aggregated boolean expression.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.

- A list of callables, where each callable returns a non-aggregated
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.

- A dictionary mapping rule names to callables, where each callable
returns a non-aggregated boolean expression.
returns a non-aggregated boolean expression.

All rule names provided here are given the prefix `"check_"`.
alias: An overwrite for this column's name which allows for using a column
name that is not a valid Python identifier. Especially note that setting
Expand Down
16 changes: 10 additions & 6 deletions dataframely/columns/integer.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,19 @@ def __init__(
is_in: A (non-contiguous) list of integers indicating valid values in this
column. If specified, both `min` and `max` must not bet set.
check: A custom rule or multiple rules to run for this column. This can be:

- A single callable that returns a non-aggregated boolean expression.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.
The name of the rule is derived from the callable name, or defaults to
"check" for lambdas.

- A list of callables, where each callable returns a non-aggregated
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.
boolean expression. The name of the rule is derived from the callable
name, or defaults to "check" for lambdas. Where multiple rules result
in the same name, the suffix __i is appended to the name.

- A dictionary mapping rule names to callables, where each callable
returns a non-aggregated boolean expression.
returns a non-aggregated boolean expression.

All rule names provided here are given the prefix `"check_"`.
alias: An overwrite for this column's name which allows for using a column
name that is not a valid Python identifier. Especially note that setting
Expand Down
Loading
Loading