Run
import numpy as np import pandas as pd s = pd.Series([1, 3, np.nan, 12, 6, 8]) print(s)
Output