To deal with mixed integer and NaN use a IntXXDType : >>> pd.to_numeric(df.age, errors='coerce').astype(pd.Int16Dtype()) 0 12 1 <NA> 2 <NA> ...
確定! 回上一頁