Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataFrameSchema validation with multiple index options #1838

Open
1 task done
vladjohnson opened this issue Oct 25, 2024 · 0 comments
Open
1 task done

DataFrameSchema validation with multiple index options #1838

vladjohnson opened this issue Oct 25, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@vladjohnson
Copy link

Describe the bug
We can only check one index type at a time. I would like to be able to check both datetime.datetime and int indexed dataframes.

  • I have checked that this issue has not already been reported.

Code Sample, a copy-pastable example

    validation_schema: InstanceOf[pa.DataFrameSchema] = (
        pa.DataFrameSchema(
            {
                ".*": pa.Column(
                    float,
                    regex=True,
                    nullable=False,
                ),
            },
            index=pa.Index(datetime), # We would like to support both datetime and int
            unique_column_names=True,
        )
    )

Expected behavior

Validation schema that supports both int and datetime.datetime types.

Desktop (please complete the following information):

  • OS: Linux Ubuntu 20.04
  • Browser: Chrome
  • Version: pandera==0.20.4
@vladjohnson vladjohnson added the bug Something isn't working label Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant