0
I have a dataframe with the following column:
Years
0 1990
1 1990
2 1990
3 1991
5 NaN
4 1994
6 NaN
... ...
Name: Years, Length: 9742, dtype: object
I have already performed part of the cleaning of this data, including np.nan
in missing data.
However, I want to change the type of data in the column - since the data is in the type object
, wish to change them to int64
for better analysis. It is possible to make this change even with NaN
present?
In addition, part of the data is in string format, such as '1996'
, and not 1996
numerical, in the type int
.
How to proceed?