Skip to content

Commit dd26b71

Browse files
committed
clean pandas/core/window/expanding.py
1 parent b12223e commit dd26b71

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/core/window/expanding.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,10 @@ def skew(self, **kwargs):
209209
210210
>>> arr = [1, 2, 3, 4, 999]
211211
>>> import scipy.stats
212-
>>> fmt = "{0:.6f}" # limit the printed precision to 6 digits
213-
>>> print(fmt.format(scipy.stats.kurtosis(arr[:-1], bias=False)))
212+
>>> precision = 6 # limit the printed precision to 6 digits
213+
>>> print(f"{scipy.stats.kurtosis(arr[:-1], bias=False):.{precision}f}")
214214
-1.200000
215-
>>> print(fmt.format(scipy.stats.kurtosis(arr, bias=False)))
215+
>>> print(f"{scipy.stats.kurtosis(arr, bias=False):.{precision}f}")
216216
4.999874
217217
>>> s = pd.Series(arr)
218218
>>> s.expanding(4).kurt()

0 commit comments

Comments
 (0)