Description
In the case of a Triangle with a multi-level index, level can be used to drop a specific level of the index via Triangle.drop().
Is your feature request aligned with the scope of the package?
Describe the solution you'd like, or your current workaround.
tri = cl.Triangle(
data={
'origin': [1985, 1985, 1985, 1986, 1986, 1987] * 4,
'development': [1985, 1986, 1987, 1986, 1987, 1987] * 4,
'paid': [300, 400, 500, 500, 600, 500] * 4,
'company': ['ballstate', 'regressive'] * 12,
'lob': (['auto'] * 6 + ['wkcomp'] * 6) * 2
},
origin='origin',
development='development',
columns=['paid'],
index=['company', 'lob'],
cumulative=True
)
print(tri.index)
company lob
0 ballstate auto
1 ballstate wkcomp
2 regressive auto
3 regressive wkcomp
print(tri.drop(index='wkcomp', level=1))
company lob
0 ballstate auto
1 regressive auto
Do you have any additional supporting notes?
No response
Would you be willing to contribute this ticket?
Description
In the case of a Triangle with a multi-level index,
levelcan be used to drop a specific level of the index viaTriangle.drop().Is your feature request aligned with the scope of the package?
Describe the solution you'd like, or your current workaround.
Do you have any additional supporting notes?
No response
Would you be willing to contribute this ticket?