Skip to content

[BUG] Location setter erroring unexpectedly #1069

Description

@henrydingliu

Are you on the latest chainladder version?

  • Yes, this bug occurs on the latest version.

Describe the bug in words

While working on p252 of Friedland, I'm trying to usetri.loc to set some values, but ran into a bug

How can the bug be reproduced?

raa = cl.load_sample('raa')
#`ILocation` sets correctly
raa.iloc[:,:,:,:5] = raa.iloc[:,:,:,:5]
#`Location` errors
raa.loc[:,:,:,:60] = raa.loc[:,:,:,:60]

What is the expected behavior?

this syntax works in pandas

df_dummy = pd.DataFrame({
    'A': [1, 2, 3],
    'B': ['x', 'y', 'z'],
    'C': [0.1, 0.2, 0.3]
})
df_dummy.loc[:,'B':] = df_dummy.loc[:,'B':]

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

    Type

    Fields

    Priority

    High

    Effort

    Medium

    Scope

    Codebase

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions