Search code examples
pythonpandasfillna

Is there a better way to use converting the float values in fillna() into an object dtype?


Is there a better way to do this conversion of the fillna values with object datatype :

df =df.fillna({"first_col":0.0, "second_col":0.0})


Solution

  • I think you need check downcast parameter, Dataframe.fillna