Skip to content

Commit 797f99c

Browse files
committed
cleanup
1 parent d37469f commit 797f99c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/strings/accessor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2159,8 +2159,8 @@ def decode(self, encoding, errors: str = "strict", dtype: str | DtypeObj = None)
21592159
f = lambda x: decoder(x, errors)[0]
21602160
arr = self._data.array
21612161
result = arr._str_map(f)
2162-
if dtype is None:
2163-
dtype = "str" if get_option("future.infer_string") else None
2162+
if dtype is None and get_option("future.infer_string"):
2163+
dtype = "str"
21642164
return self._wrap_result(result, dtype=dtype)
21652165

21662166
@forbid_nonstring_types(["bytes"])

0 commit comments

Comments
 (0)