Insert missing data in pandas

pd.Series([1, np.nan, 2, None])

Out:
0    1.0
1    NaN
2    2.0
3    NaN
dtype: float64

Here is what the above code is Doing:
1. We create a series with four values.
2. We print the series.
3. We print the type of the series.

As you can see, the type of the series is float64.

Now, let’s see what happens when we create a series with strings:

In [4]:

pd.Series([‘a’, ‘b’, ‘c’])

Out:
0 a
1 b
2 c
dtype: object