We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 889829a commit 358000fCopy full SHA for 358000f
pandas/_libs/lib.pyx
@@ -758,11 +758,11 @@ cpdef ndarray[object] ensure_string_array(
758
if not check_null(val):
759
if coerce =="all" or coerce == "non-null":
760
if not isinstance(val, np.floating):
761
- # f"{val}" is faster than str(val)
762
- result[i] = f"{val}"
763
- else:
764
- # f"{val}" is not always equivalent to str(val) for floats
765
- result[i] = str(val)
+ # f"{val}" is faster than str(val)
+ result[i] = f"{val}"
+ else:
+ # f"{val}" is not always equivalent to str(val) for floats
+ result[i] = str(val)
766
else:
767
raise ValueError(f"Element {val} is not a string or valid null."
768
"If you want it to be coerced to a string,"
0 commit comments