Make Cut return the selected dataframe
Usually the use wants to work with the selected dataframe directly, however, currently code snippets as the following are very common.
selected = cut(df)
selected_df = df[selected]
To improve the situation, the select()
method was introduced:
selected_df = cut.select(df)
I think it would be more idiomatic, if the call method returns the dataframe directly
selected_df = cut(df)
and an auxiliary method, like selected = cut.idxarr(df)
returns the index array.