Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit e7425fc

Browse files
committed
avoid np in output
1 parent 3bb0464 commit e7425fc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • third_party/bigframes_vendored/pandas/core

third_party/bigframes_vendored/pandas/core/series.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,16 +1283,16 @@ def autocorr(self, lag: int = 1) -> float:
12831283
12841284
12851285
>>> s = bpd.Series([0.25, 0.5, 0.2, -0.05])
1286-
>>> s.autocorr()
1287-
0.10355263309024065
1286+
>>> float(s.autocorr()) # doctest: +ELLIPSIS
1287+
0.1035526330902...
12881288
1289-
>>> s.autocorr(lag=2)
1289+
>>> float(s.autocorr(lag=2))
12901290
-1.0
12911291
12921292
If the Pearson correlation is not well defined, then 'NaN' is returned.
12931293
12941294
>>> s = bpd.Series([1, 0, 0, 0])
1295-
>>> s.autocorr()
1295+
>>> float(s.autocorr())
12961296
nan
12971297
12981298
Args:

0 commit comments

Comments
 (0)