0

Round function in oracle and Pandas are giving different values. Is there a way to make them same apart from writing custom function.

select round(23.685,2) from dual; ---23.69

Pandas round function code :

Sample = {'Value': [23.685]}
df = pd.DataFrame(Sample, columns= ['Value'])
df.round(2)  --23.68
Bhanu Yadav
  • 169
  • 7
  • 1
    Python uses [round half to even](https://en.wikipedia.org/wiki/Rounding#Round_half_to_even). I'm guessing Oracle just rounds half up...? – Chris Adams Jun 03 '19 at 12:31
  • Please let me know if the link in dupe doesn't answer your question. – anky Jun 03 '19 at 12:34
  • 1
    @ChrisA/ @anky_91 Thanks for the link I got some clue from these links.Can now figure out something and will answer. – Bhanu Yadav Jun 03 '19 at 13:02

0 Answers0