-
Notifications
You must be signed in to change notification settings - Fork 91
Labels
Effort > Brief 🐇Small tasks expected to take a few hours up to a couple of days.Small tasks expected to take a few hours up to a couple of days.Great First Contribution! 🌱Beginner friendly tickets with narrow scope and huge impact. Perfect to join our community!Beginner friendly tickets with narrow scope and huge impact. Perfect to join our community!Impact > Minor 🔷Small, backward compatible change. Treat like a patch release (e.g., 0.5.8 → 0.5.9).Small, backward compatible change. Treat like a patch release (e.g., 0.5.8 → 0.5.9).Triage Pending ⚠️New issues that haven't yet been reviewed or categorized.New issues that haven't yet been reviewed or categorized.
Description
Are you on the latest chainladder version?
- Yes, this bug occurs on the latest version.
Describe the bug in words
Some nonsense values can be passed to TrianglePandas.rename without triggering an exception. Instead, the method simply returns self if none of the conditional branches are triggered:
value = [value] if type(value) is str else value
if axis == "index" or axis == 0:
self.index = value
if axis == "columns" or axis == 1:
self.columns = value
if axis == "origin" or axis == 2:
self.origin = value
if axis == "development" or axis == 3:
self.development = value
return self
Users may end up believing that something was renamed, when instead nothing actually happened.
How can the bug be reproduced?
The following is an example where the user mistypes "columns" as "colunms".
genins = cl.load_sample('genins')
genins.rename('colunms', 'bar')
What is the expected behavior?
A ValueError should be triggered, notifying the user that an invalid value was passed to the axis argument.
Metadata
Metadata
Assignees
Labels
Effort > Brief 🐇Small tasks expected to take a few hours up to a couple of days.Small tasks expected to take a few hours up to a couple of days.Great First Contribution! 🌱Beginner friendly tickets with narrow scope and huge impact. Perfect to join our community!Beginner friendly tickets with narrow scope and huge impact. Perfect to join our community!Impact > Minor 🔷Small, backward compatible change. Treat like a patch release (e.g., 0.5.8 → 0.5.9).Small, backward compatible change. Treat like a patch release (e.g., 0.5.8 → 0.5.9).Triage Pending ⚠️New issues that haven't yet been reviewed or categorized.New issues that haven't yet been reviewed or categorized.