Skip to content

Allow Triangle.drop() to drop development periods #1057

Description

@genedan

Description

Triangle.drop() should be able to drop a development period when axis=3.

Is your feature request aligned with the scope of the package?

  • Yes, absolutely!
  • No, but it's still worth discussing.
  • N/A (this request is not a codebase enhancement).

Describe the solution you'd like, or your current workaround.

tri = cl.Triangle(
    data={
        'origin': [1985, 1985, 1985, 1986, 1986, 1987],
        'development': [1985, 1986, 1987, 1986, 1987, 1987],
        'paid': [300, 400, 500, 500, 600, 500],
    },
    origin='origin',
    development='development',
    columns=['paid'],
    cumulative=True
)
print(tri)

         12     24     36
1985  300.0  400.0  500.0
1986  500.0  600.0    NaN
1987  500.0    NaN    NaN
print(tri.drop(labels='12`, axis=3)

          24     36
1985   400.0  500.0
1986   600.0    NaN
1987     NaN    NaN

Do you have any additional supporting notes?

No response

Would you be willing to contribute this ticket?

  • Yes, absolutely!
  • Yes, but I would like some help.
  • No.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fields

    Priority

    Low

    Effort

    Medium

    Scope

    Codebase

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions