title: Round Down and Round Up float to negative decimals point in python
body: <p>I'm looking for something to round up and round down at 1,2, and -1 decimal points in python, I have written some logic through it I am able to get the right values for +ve points but still looking round down -ve values.</p>
  <p>my code is as -:</p>
  <pre><code>import decimal
  
  outcome = '2156.24611496733'
  rounding=&quot;Alwayes Down&quot; 
  decimal_place = -1
  
  #   for positive values
  if rounding == &quot;Alwayes Up&quot;:
      decimal.getcontext().rounding = decimal.ROUND_UP
  
  elif rounding == &quot;Alwayes Down&quot;:
      decimal.getcontext().rounding = decimal.ROUND_DOWN
  
  #   for negative values
  if rounding == &quot;Alwayes Down&quot;:
      print(round(float(outcome), decimal_place))
  
  rounding_string = &quot;1.&quot; + &quot;0&quot;*int(decimal_place)
  decimal_outcome = decimal.Decimal(str(outcome)).quantize(decimal.Decimal(rounding_string))
  
  print(decimal_outcome)
  </code></pre>
  <p>Table value is like - <a href="https://i.stack.imgur.com/Qsqcv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Qsqcv.png" alt="enter image description here" /></a></p>
  <p>I am expecting values like</p>
  <p><a href="https://i.stack.imgur.com/wa9i1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wa9i1.png" alt="enter image description here" /></a></p>