We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e98c314 commit a9397b5Copy full SHA for a9397b5
bisect/46512.py
@@ -0,0 +1,14 @@
1
+# BUG: Inconsistency in DataFrame.where between inplace and not inplace with na like value
2
+# for StringArray #46512
3
+
4
+import numpy as np
5
+import pandas as pd
6
7
+print(pd.__version__)
8
9
+df = pd.DataFrame({"A": ["1", "", "3"]}, dtype="string")
10
+df.where(df != "", np.nan, inplace=True)
11
+print(df)
12
+arr = df["A"]._values
13
+print(arr)
14
+assert arr[1] is pd.NA, type(arr[1])
0 commit comments