pandas read int contain null will be float type

This issue has been tracked since 2022-09-22.
df=pd.read_sql(sql,conn)
df.dtypes

a float64, and values:
0 NaN
1 3.0
2 2.0
and 3 changed to 3.0, then can't write back to db.
why pandas do this? another python package datatable also remain int ,
0
1 3
2 2

phofl wrote this answer on 2022-09-22

Hi, thanks for your report. We don't support automatic conversion to nullable dtypes in every io function yet.

More Details About Repo
Owner Name pandas-dev
Repo Name pandas
Full Name pandas-dev/pandas
Language Python
Created Date 2010-08-24
Updated Date 2022-10-04
Star Count 35430
Watcher Count 1120
Fork Count 15089
Issue Count 3589

YOU MAY BE INTERESTED

Issue Title Created Date Updated Date