We previously saw how the .fillna() method can be used to replace the NaN values with a value of your own decision. The .fillna() method can actually be thought of as an implementation of the .map() method that maps a single value, NaN, to a specific value.
Even more generically, the .fillna() method itself can be considered a specialization of a more general replacement that is provided by the .replace() method. This method provides more flexibility by being able to replace any value (not just NaN) with another value.
The most basic use of the .replace() method is to replace an individual value with another:
It is also possible ...