You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following methods make sense to have numeric_only, but won't fail on any input (or hashable input for nunique and value_counts), and so I think it's okay if they don't. But is still nice to have.
all
any
bfill
count
ffill
nunique
value_counts
The following methods should not get a numeric_only argument. They fall into a few typical camps: filters, plotting, or they do not depend on the columns (e.g. cumcount and size)
boxplot
cumcount
describe # Handled by include="all"
filter
head
hist
nth
pipe
plot
shift
size
tail
take
The text was updated successfully, but these errors were encountered:
Looking at the all possible methods that argument numeric_only= needs to support, I think...
wouldn't it be better to have independent method .numeric_only() to select columns with numeric values or number dtypes, since numeric_only= argument can conflict with the function to be .agg() in the parameter name which is numeric_only
One can already do DataFrame.select_dtypes('numeric'). I think we should strive for consistency of arguments between DataFrame and groupby ops where it makes sense, and this is one of those cases. So unless we're going to deprecate numeric_only across the board, I'm still positive on including them in groupby.
But the purpose was to select numeric columns from DataFrameGroupby. I think .select_dtypes('numer') is applicable only on DataFrame object. Or we might add the method select_dtypes() also to DataFrameGroupyby.
I think for the purpose of dendency problem I would suggest to maintain it(numeric_only) and also get *arg, and **kwargs for the functions to be applied... (I mean in the case of .mean() or .std()... etc, because .mean(skipna=False) does not work...) When you think about it, numeric_only is not so popular parameter name and we can urge users to avoid it...(I wonder if there is any function that uses parameter name numeric_only or we can always make custom function with lambda x: f(x, numeric_only=True) or something similar.
Uh oh!
There was an error while loading. Please reload this page.
Inspecting the various groupby ops, I think the following are cases where we should have
numeric_only
.numeric_only
toDataFrame.cum*
methods #53072)numeric_only
toDataFrame.cum*
methods #53072)The following methods make sense to have
numeric_only
, but won't fail on any input (or hashable input for nunique and value_counts), and so I think it's okay if they don't. But is still nice to have.The following methods should not get a
numeric_only
argument. They fall into a few typical camps: filters, plotting, or they do not depend on the columns (e.g. cumcount and size)include="all"
The text was updated successfully, but these errors were encountered: