I have a series of type object, When using Series.str.strip() the cells that contain only int are getting turned into Nan.
How do I avoid this?
example
sr = pd.Series([1,2,3,'foo '])
sr.str.strip()
0 NaN
1 NaN
2 NaN
3 foo
dtype: object
desired outcome
0 1
1 2
2 3
3 foo
dtype: object