Skip to content

CLN: remove unused row_bool_subset #27466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 20, 2019
Merged

Conversation

jbrockmendel
Copy link
Member

@jreback can you confirm my hunch that the result.ndim == 2 block in groupby.ops was for Panel?

Tracing back the blame, row_bool_subset was introduced here in 2012 to close #152 and it started being called only for result.ndim == 2 here

@WillAyd
Copy link
Member

WillAyd commented Jul 19, 2019

Haven't looked deeply but seems like this is more for ohlc than Panel right?

@jbrockmendel
Copy link
Member Author

I speculate that it’s for Panel because if it is an agg op that should be a reduction, so we shouldn’t get a 2D result unless we started with 3D. But “speculate” is definitely the important word in that sentence

@WillAyd
Copy link
Member

WillAyd commented Jul 19, 2019

so we shouldn’t get a 2D result unless we started with 3D

Yea that's not quite true with ohlc though. To illustrate:

In [20]: ser = pd.Series([1], index=[pd.Timestamp('today')])

In [21]: ser.groupby([1]).ohlc()
Out[21]:
   open  high  low  close
1     1     1    1      1

Not sure what would specifically hit this branch but I think ohlc test coverage is weak so just need to be careful

@jbrockmendel
Copy link
Member Author

Dangit Will, you're gonna make me go and do actual critical thinking instead of mechanically reading the coverage results...

@jbrockmendel
Copy link
Member Author

Hmm that example doesn't break on this branch, so must not go through this code path. Still, the point that test coverage is spotty is well-taken.

@jreback jreback added this to the 1.0 milestone Jul 20, 2019
@jreback jreback merged commit 28317f5 into pandas-dev:master Jul 20, 2019
@jreback
Copy link
Contributor

jreback commented Jul 20, 2019

thanks @jbrockmendel

I don't really remember where this was used, does seem like its related to Panel though.

quintusdias pushed a commit to quintusdias/pandas_dev that referenced this pull request Aug 16, 2019
@jbrockmendel jbrockmendel deleted the rowbool branch April 5, 2020 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write fast OHLC aggregator
3 participants