# 9.17:  Replace missing values using a general-purpose replacement method.  Use .replace() to
# substitute np.nan or None with other values.

import pandas as pd
import numpy as np

df = pd.DataFrame({
    'A': [1, 2, np.nan, 4],
    'B': [5, np.nan, np.nan, 8],
    'C': ['x', 'y', 'z', None]
})
print('df:')
df

print('df.replace(np.nan, 999):')
df.replace(np.nan, 999)

