ENH: Disallow subsetting columns in groupby with axis=1 (original) (raw)
E.g.
df = pd.DataFrame({'A': [1], 'B': [2], 'C': [3]})
g = df.groupby([0, 0, 1], axis=1)
g[['A', 'B']].sum()
Other than using .size(), I think just about any op will raise. This can be explicitly raised with a more helpful error message when a user subsets the columns.