We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
numfocus
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 93879df commit 8ae9403Copy full SHA for 8ae9403
pandas/core/frame.py
@@ -162,6 +162,7 @@
162
from pandas.core.array_algos.take import take_2d_multi
163
from pandas.core.arraylike import OpsMixin
164
from pandas.core.arrays import (
165
+ BaseMaskedArray,
166
DatetimeArray,
167
ExtensionArray,
168
PeriodArray,
@@ -10605,9 +10606,9 @@ def corrwith(
10605
10606
nonnull_mask = ~self[col].isna() & k_mask
10607
if isinstance(val, BaseMaskedArray):
10608
val = val._data
- corrs[col] = np.corrcoef(
10609
- val[nonnull_mask], k[nonnull_mask]
10610
- )[0, 1]
+ corrs[col] = np.corrcoef(val[nonnull_mask], k[nonnull_mask])[
+ 0, 1
10611
+ ]
10612
else:
10613
for col in cols:
10614
val = self[col].values
0 commit comments