Skip to content

Add cut as a Series method #28925

@JoshuaC3

Description

@JoshuaC3

Problem description

It would be to have cut as a series method so that we can method chain. Currently, we must use pd.cut, for example,

filled_series = df.some_series.fillna(0)
pd.cut(filled_series, 10).mean()

it would be nice to do,

df.some_series.fillna(0).cut(10).mean()

This would also help hugely with tab completion.

Expected Output

To have a tab-completed series method for cut.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions