Skip to content

[BUG] Handle case when labels=None in Triangle.drop() #1062

Description

@genedan

Are you on the latest chainladder version?

  • Yes, this bug occurs on the latest version.

Describe the bug in words

The signature of Triangle.drop() has the default argument labels=None. However, this results in a TypeError when used in combination with the only (currently) supported axis=1.

How can the bug be reproduced?

import chainladder as cl
raa = cl.load_sample('raa')

raa.drop(axis=1)

...
TypeError: 'NoneType' object is not iterable

What is the expected behavior?

The case when labels=None is meant to accommodate the situation when index, columns, origin, or development parameters are used instead. These have yet to be implemented, so this issue should be solved only after those parameters have been implemented.

When none of labels, index, columns, origin, or development are filled out, we should receive the following error message:

raa.drop()
...
ValueError: Need to specify at least one of 'labels', 'index', 'columns', 'origin', or 'development'

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

    Great First Contribution! 🌱Beginner friendly tickets with narrow scope and huge impact. Perfect to get your feet wet!

    Type

    Fields

    Priority

    Low

    Effort

    Low

    Scope

    Codebase

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions