Skip to content

Commit

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

print(pd.__version__)
df = pd.DataFrame({"a": ["a", "b", "c"], "b": ["d", "", ""]}, dtype="string")

df.replace(r"^\s*$", pd.NA, regex=True, inplace=True)
print(df)

0 comments on commit b60bc69

Please sign in to comment.