@@ -927,8 +927,9 @@ def f(arg, *args, **kwargs):
927
927
If False then only matching columns between self and other will be used
928
928
and the output will be a DataFrame.
929
929
If True then all pairwise combinations will be calculated and the
930
- output will be a Panel in the case of DataFrame inputs. In the case of
931
- missing elements, only complete pairwise observations will be used.
930
+ output will be a MultiIndexed DataFrame in the case of DataFrame
931
+ inputs. In the case of missing elements, only complete pairwise
932
+ observations will be used.
932
933
ddof : int, default 1
933
934
Delta Degrees of Freedom. The divisor used in calculations
934
935
is ``N - ddof``, where ``N`` represents the number of elements.""" )
@@ -964,11 +965,12 @@ def _get_cov(X, Y):
964
965
other : Series, DataFrame, or ndarray, optional
965
966
if not supplied then will default to self and produce pairwise output
966
967
pairwise : bool, default None
967
- If False then only matching columns between self and other will be used
968
- and the output will be a DataFrame.
968
+ If False then only matching columns between self and other will be
969
+ used and the output will be a DataFrame.
969
970
If True then all pairwise combinations will be calculated and the
970
- output will be a Panel in the case of DataFrame inputs. In the case of
971
- missing elements, only complete pairwise observations will be used.""" )
971
+ output will be a MultiIndex DataFrame in the case of DataFrame inputs.
972
+ In the case of missing elements, only complete pairwise observations
973
+ will be used.""" )
972
974
973
975
def corr (self , other = None , pairwise = None , ** kwargs ):
974
976
if other is None :
@@ -1397,8 +1399,9 @@ def _constructor(self):
1397
1399
If False then only matching columns between self and other will be used and
1398
1400
the output will be a DataFrame.
1399
1401
If True then all pairwise combinations will be calculated and the output
1400
- will be a Panel in the case of DataFrame inputs. In the case of missing
1401
- elements, only complete pairwise observations will be used.
1402
+ will be a MultiIndex DataFrame in the case of DataFrame inputs.
1403
+ In the case of missing elements, only complete pairwise observations will
1404
+ be used.
1402
1405
bias : boolean, default False
1403
1406
Use a standard estimation bias correction
1404
1407
"""
@@ -1708,11 +1711,12 @@ def dataframe_from_int_dict(data, frame_template):
1708
1711
# TODO: not the most efficient (perf-wise)
1709
1712
# though not bad code-wise
1710
1713
from pandas import Panel , MultiIndex , Index
1711
- p = Panel .from_dict (results ).swapaxes ('items' , 'major' )
1712
- if len (p .major_axis ) > 0 :
1713
- p .major_axis = arg1 .columns [p .major_axis ]
1714
- if len (p .minor_axis ) > 0 :
1715
- p .minor_axis = arg2 .columns [p .minor_axis ]
1714
+ with warnings .catch_warnings (record = True ):
1715
+ p = Panel .from_dict (results ).swapaxes ('items' , 'major' )
1716
+ if len (p .major_axis ) > 0 :
1717
+ p .major_axis = arg1 .columns [p .major_axis ]
1718
+ if len (p .minor_axis ) > 0 :
1719
+ p .minor_axis = arg2 .columns [p .minor_axis ]
1716
1720
1717
1721
if len (p .items ):
1718
1722
result = pd .concat (
0 commit comments