|
21 | 21 | Arguments and keyword arguments to be passed into func. |
22 | 22 | """ |
23 | 23 |
|
24 | | -_pairwise_template = """ |
25 | | - Parameters |
26 | | - ---------- |
27 | | - other : Series, DataFrame, or ndarray, optional |
28 | | - If not supplied then will default to self and produce pairwise |
29 | | - output. |
30 | | - pairwise : bool, default None |
31 | | - If False then only matching columns between self and other will be |
32 | | - used and the output will be a DataFrame. |
33 | | - If True then all pairwise combinations will be calculated and the |
34 | | - output will be a MultiIndex DataFrame in the case of DataFrame |
35 | | - inputs. In the case of missing elements, only complete pairwise |
36 | | - observations will be used. |
37 | | - bias : bool, default False |
38 | | - Use a standard estimation bias correction. |
39 | | - **kwargs |
40 | | - Keyword arguments to be passed into func. |
41 | | -""" |
42 | | - |
43 | 24 |
|
44 | 25 | class EWM(_Rolling): |
45 | 26 | r""" |
@@ -317,10 +298,26 @@ def f(arg): |
317 | 298 |
|
318 | 299 | @Substitution(name="ewm") |
319 | 300 | @Appender(_doc_template) |
320 | | - @Appender(_pairwise_template) |
321 | 301 | def cov(self, other=None, pairwise=None, bias=False, **kwargs): |
322 | 302 | """ |
323 | 303 | Exponential weighted sample covariance. |
| 304 | +
|
| 305 | + Parameters |
| 306 | + ---------- |
| 307 | + other : Series, DataFrame, or ndarray, optional |
| 308 | + If not supplied then will default to self and produce pairwise |
| 309 | + output. |
| 310 | + pairwise : bool, default None |
| 311 | + If False then only matching columns between self and other will be |
| 312 | + used and the output will be a DataFrame. |
| 313 | + If True then all pairwise combinations will be calculated and the |
| 314 | + output will be a MultiIndex DataFrame in the case of DataFrame |
| 315 | + inputs. In the case of missing elements, only complete pairwise |
| 316 | + observations will be used. |
| 317 | + bias : bool, default False |
| 318 | + Use a standard estimation bias correction |
| 319 | + **kwargs |
| 320 | + Keyword arguments to be passed into func. |
324 | 321 | """ |
325 | 322 | if other is None: |
326 | 323 | other = self._selected_obj |
@@ -348,10 +345,24 @@ def _get_cov(X, Y): |
348 | 345 |
|
349 | 346 | @Substitution(name="ewm") |
350 | 347 | @Appender(_doc_template) |
351 | | - @Appender(_pairwise_template) |
352 | 348 | def corr(self, other=None, pairwise=None, **kwargs): |
353 | 349 | """ |
354 | 350 | Exponential weighted sample correlation. |
| 351 | +
|
| 352 | + Parameters |
| 353 | + ---------- |
| 354 | + other : Series, DataFrame, or ndarray, optional |
| 355 | + If not supplied then will default to self and produce pairwise |
| 356 | + output. |
| 357 | + pairwise : bool, default None |
| 358 | + If False then only matching columns between self and other will be |
| 359 | + used and the output will be a DataFrame. |
| 360 | + If True then all pairwise combinations will be calculated and the |
| 361 | + output will be a MultiIndex DataFrame in the case of DataFrame |
| 362 | + inputs. In the case of missing elements, only complete pairwise |
| 363 | + observations will be used. |
| 364 | + **kwargs |
| 365 | + Keyword arguments to be passed into func. |
355 | 366 | """ |
356 | 367 | if other is None: |
357 | 368 | other = self._selected_obj |
|
0 commit comments