Skip to content

pandera[io] and pandera[all] optional-dependencies missing pandas and numpy #2127

@MikeEvansLarah

Description

@MikeEvansLarah

Describe the bug

The io module uses the Pandas engine, however the associated optional-dependencies does not specify the required pandas or numpy packages as dependencies:

pandera/pyproject.toml

Lines 57 to 61 in 3ce6a42

io = [
"pyyaml >= 5.1",
"black",
"frictionless <= 4.40.8",
]

Similarly, the all optional-dependencies also does not specify pandas or numpy.

This seems to be an oversight from when pandas and numpy moved from core dependencies into the pandera[pandas] optional-dependencies.

  • I have checked that this issue has not already been reported.
  • I have confirmed this bug exists on the latest version of pandera.
  • (optional) I have confirmed this bug exists on the main branch of pandera.

Additional context

The import check in panda_io.py also does not check for pandas or numpy:

try:
import black
import yaml
from frictionless import Schema as FrictionlessSchema
except ImportError as exc: # pragma: no cover
raise ImportError(
"IO and formatting requires 'pyyaml', 'black' and 'frictionless'"
"to be installed.\n"
"You can install pandera together with the IO dependencies with:\n"
"pip install pandera[io]\n"
) from exc

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions