Skip to content

Allow unsorted (but still "continuous") index for packing #158

@hombit

Description

@hombit

In src/nested_pandas/series/packer.py we frequently assume index to be sorted, for example here:

def pack_sorted_df_into_struct(df: pd.DataFrame, name: str | None = None) -> pd.Series:

return pack_sorted_df_into_struct(flat)

We should make it more flexible and allow "continuous" index.

Before submitting
Please check the following:

  • I have described the situation in which the bug arose, including what code was executed, information about my environment, and any applicable data others will need to reproduce the problem.
  • I have included available evidence of the unexpected behavior (including error messages, screenshots, and/or plots) as well as a description of what I expected instead.
  • If I have a solution in mind, I have provided an explanation and/or pseudocode and/or task list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions