OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Pandas read sql integer became float

  • Thread starter Thread starter GDI
  • Start date Start date
G

GDI

Guest
When I use pandas to read a MySQL table, some columns (see 'to_nlc' in the image below) that used to have an integer type became a floating-point number (automatically append .0).

Can anyone figure out why this happens? Or at least have a guess?

enter image description here enter image description hereenter image description here
<p>When I use pandas to read a MySQL table, some columns (see 'to_nlc' in the image below) that used to have an integer type became a floating-point number (automatically append .0).</p>
<p>Can anyone figure out why this happens? Or at least have a guess?</p>
<p><a href="https://i.sstatic.net/1obo8.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/1obo8.png" alt="enter image description here" /></a>
<a href="https://i.sstatic.net/vexAh.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/vexAh.png" alt="enter image description here" /></a><a href="https://i.sstatic.net/oCNJg.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/oCNJg.png" alt="enter image description here" /></a></p>
 

Latest posts

Top