-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
DeprecateFunctionality to remove in pandasFunctionality to remove in pandasGroupbyNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further actionReduction Operationssum, mean, min, max, etc.sum, mean, min, max, etc.
Milestone
Description
As far as I can tell, corrwith was added simply because it could be along with other methods on DataFrame. Searching SO gives two results, of which corrwith
is not involved in the solution for both. I'm guessing this method really doesn't see much if any use.
It's signature is odd - it pairs each of the groups up with a single DataFrame and aligns them.
df = pd.DataFrame({"a": [1, 1, 1, 2, 2, 2], "b": range(6)})
df2 = pd.DataFrame({"a": [1, 1, 1, 2, 2, 2, 3], "b": [10 - e for e in range(3)] + list(range(3)) + [10]})
gb = df.groupby("a")
print(gb.corrwith(df2))
# b a
# a
# 1 -1.0 NaN
# 2 1.0 NaN
I'm thinking we should deprecate this method.
Metadata
Metadata
Assignees
Labels
DeprecateFunctionality to remove in pandasFunctionality to remove in pandasGroupbyNeeds DiscussionRequires discussion from core team before further actionRequires discussion from core team before further actionReduction Operationssum, mean, min, max, etc.sum, mean, min, max, etc.