what I need is similar to %.2f but so that any 0 or . endings are deleted.
An example follows, on the left are the float numbers and on the right the desired formatting.
4525.0014436  ->   '4525'
4525.0091     ->   '4525.01'
4525.1036     ->   '4525.1'
4525.163465   ->   '4525.16'
4525.998      ->   '4526'
Is there a way to get this formatted in python? Or is it necessary to do it algorithmically?
