Skip to content

If pandas index class is used in schema, Index type wrapper should not be needed #9

Description

@pierreprecis

Pandas have several index types, e.g., pandas.Int64Index, pandas DatetimeIndex, pandas.CategoricalIndex.

in a schema definition one should be able to use pandas index types as "index markers" and not need to wrap the in pandabear.Index type.

# current behaviour if this types where supported
class MySchema(DataframeModel):
    date: Index[pd.DatetimeIndex]
    ...

# nicer:
class MySchema(DataframeModel):
    date: pd.DatetimeIndex
    ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions