Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
Comments¶
DataFrame.replaceworks different fromDataFrame.update.
import pandas as pddf = pd.DataFrame({"x": [1, 2, 3, 4, 5], "y": [5, 4, 3, 2, 1]})
dfLoading...
df.x[df.x < 3] = 1000dfLoading...
df.y.replace(5, 5000, inplace=True)dfLoading...