Skip to content

Tag: pandas

Convert np.nan to pd.NA

How can I convert np.nan into the new pd.NA format, given the pd.DataFrame comprises float? Making use of pd.convert_dtypes() doesn’t seem to work when df comprises float. This conversion is however working fine when df contains int. Answer From v1.2 this now works with floats by default and if you want…