Skip to content

Feature Request to my future me: Add coercing for data types #3

Description

@Ygor-J

Say I want to have regex-like validation for an integer field, I would not be able to do that.

So first, I'd have to SAFE CAST the integer field to a string and then apply regex rules.

Example in a YAML file in pandera:

  component_position:
    dtype: str
    nullable: false
    checks:
      str_matches: ^(?:[1-9]|[12]\d|30)$ # Regex for numeric 1-30
    required: true
    coerce: true

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions