Skip to content

Commit

Permalink
code sample for pandas-dev#38874
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjayhawkins committed Jan 1, 2021
1 parent eeb0d59 commit e0327f7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bisect/38874.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import pandas as pd

print(pd.__version__)

df = pd.DataFrame({"A": [1e-8, -1.1e-8, 1.2e-8, -1.1e-8] * 5})

result = df["A"].rolling(10).std(ddof=0)
print(result)

expected = df["A"][-10:].std(ddof=0)

assert result[19] == expected

0 comments on commit e0327f7

Please sign in to comment.