pandas read int contain null will be float type

This issue has been created 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-09-29
Star Count 35374
Watcher Count 1122
Fork Count 15034
Issue Count 3579

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
dropout with train=false produces error 1 2021-11-28 2022-03-14
Sinks: filter by tags is not filtering 4 2022-07-27 2022-08-15
Minor niggle with log plots. 1 2022-04-25 2022-08-10
Cite, Edit, Remove and permalink icons / links missing 2 2021-09-15 2022-07-20
Feature Request for ModMail 5 2021-05-18 2022-04-26
Unable to add library with Arduino IDE 2.0.0-beta.7 2 2021-06-24 2022-09-15
FormData is not being send 30 2021-12-28 2022-09-05
RPC Server Unavailable 2 2022-05-05 2022-07-29
The current master fails to read the config file (as the ~ is not expanded) 2 2021-01-03 2022-09-02
unable to update to lean nightly 2021-11-25 3 2021-12-10 2022-09-22
Update `python` to `python3` in Dockerfile 8 2022-04-19 2022-08-16
web-ui "servers" page tries to access API on localhost 2 2021-05-27 2022-07-22
DefineStmt is not implemented 2 2021-10-14 2022-09-01
Can't launch after installing from AUR 7 2020-08-28 2022-07-20
SSH to ev3 1 2021-05-29 2021-12-30
Faster writing of Json-objects by not boxing properties 9 2021-11-09 2022-09-29
Idea: only make request if element is visible 8 2017-10-24 2022-09-15
Extension issue 1 2021-11-11 2022-01-09
On Custom Inserts, clicking on "Tweaks" link directs you to a non-existent page 0 2021-10-10 2022-09-27
Appearing "\backslash \_" instead of "\_" in math 1 2021-02-10 2022-09-20
[BUG] Reserve doesn't work in i3 4 2021-06-25 2022-09-08
Installation fails on Jupyter (MacOS) 9 2021-11-22 2022-09-19
Passbolt install script fails when key material is already in /etc/ssl 1 2021-05-08 2022-09-22
Could you please make navigator tree more compact? 2 2021-12-02 2022-08-31
Does wire do zig-zag / 7bit encoding? 0 2017-12-06 2022-09-18
Add CPU panels 0 2021-06-16 2022-01-19
Autocomplete: make option for keep-first selects hovered option on blur 10 2021-08-22 2022-09-20
CREATE EMPTY AS SELECT ERROR on 22.8 8 2022-09-07 2022-09-08
Remove all connected sessions during keeper shutdown 0 2022-09-07 2022-09-08
请问是否可以把一个句子分成多个有用词? 2 2021-10-24 2022-01-16
Informations about client installation in Windows Server 1 2021-08-24 2022-09-15
metabox field isn't displayed 1 2021-02-17 2022-01-04
Outline columns in inspector not resizable 1 2022-05-22 2022-09-14
[Feature] fake-ip-range能否同时启用ipv6网段 1 2021-11-27 2022-09-25
ttf does not offer `TTF_RenderGlyph_Solid` 2 2021-06-07 2022-09-18
Updating packages to support React ^17.0.0 0 2021-04-16 2022-09-01
How to set the log to respect log-specification? 1 2021-11-23 2022-07-18
Does this package work with ROS Noetic? 0 2022-04-13 2022-09-09
Plugin Errors 1 2021-11-09 2022-01-13
Generated Python package for "Game Services" module cannot be imported 0 2021-09-04 2022-08-01
using require 1 2021-07-29 2022-01-02
Picodrive Core on Steam is not marked as Linux-supported 0 2021-12-06 2022-09-01
regarding the ground truth 0 2021-06-10 2022-09-26
rustup 1.25: On Windows, nested cargo invocation with a toolchain specified fails 10 2022-07-12 2022-09-27
Windows Terminal does not find font on start 5 2022-01-03 2022-09-01
Azure CLI (azure-devops) 0.22.0 installed on Ubuntu1804 5 2021-11-18 2022-09-18
tftypes: Consider Additional Errors for (Value).ApplyTerraform5AttributePathStep() 1 2021-10-04 2022-09-23
v3 breaks with yarn workspaces/lerna 23 2021-05-07 2022-09-23
Testing something 1 2020-10-28 2021-12-31
How can I limit the size of the splashscreen image? 3 2022-05-28 2022-09-22