pandas.DataFrame.replace raises UnboundLocalError on mixed data types #11698
Labels
Bug
Indexing
Related to indexing on series/frames, not to indexes themselves
Internals
Related to non-user accessible pandas implementation
Missing-data
np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Milestone
This is in 0.17.1. Suppose we have a frame with mixed data types. Suppose also we want to replace a string value with something else. If the frame has only string columns, or maybe string and int columns, this works fine. However, if the frame has string and datetime columns, this raises an exception. Example:
And the requisite show_versions:
The text was updated successfully, but these errors were encountered: