Open ggggggggg opened 2 months ago
This is a side-effect of porting the method from Expr to Series.
For Expr, the resulting expression is named "a"
in all cases, but when include_breakpoint=True
the return data type is a Struct and the fields are named breakpoint/count. Because we expand that struct to a dataframe in the Series method, the original name is lost.
I think the best solution would be to just follow Expr here and return a Struct Series, not a DataFrame. That's how cut/qcut
work at the moment. What would you think of that solution?
hist
is sort-of modeled after cut/qcut
, but we aim to overhaul that API so that is not very helpful either.
Returning a struct series seems fine to me.
Checks
Reproducible example
Log output
No response
Issue description
The column containing the counts has different names in the two invocations of
hist
.Expected behavior
I expect the column containing the count to be named "count" in both cases, or less preferably "a" in both cases. However it is called "a" when neither break_point not category are included.
Installed versions