Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rhshadrach committed Feb 16, 2025
1 parent d37469f commit 797f99c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandas/core/strings/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2159,8 +2159,8 @@ def decode(self, encoding, errors: str = "strict", dtype: str | DtypeObj = None)
f = lambda x: decoder(x, errors)[0]
arr = self._data.array
result = arr._str_map(f)
if dtype is None:
dtype = "str" if get_option("future.infer_string") else None
if dtype is None and get_option("future.infer_string"):
dtype = "str"
return self._wrap_result(result, dtype=dtype)

@forbid_nonstring_types(["bytes"])
Expand Down

0 comments on commit 797f99c

Please sign in to comment.