Home > Back-end >  How to make all the values in a pandas DataFrame as False?
How to make all the values in a pandas DataFrame as False?

Time:10-27

I have a DataFrame (close) like this:

enter image description here

How can I make all the values (including NaN and any float number) inside this DataFrame as False?

pandas.DataFrame.replace doesn't seem to have this ability to achieve my goal.

Does anyone know how to do this?

CodePudding user response:

You could do with assign

df[:] = False
  • Related