Updating DataFrame Value
With this DataFrame called data...
winner
runner_name
Steve 0
Joe 0
Marsha 1
Kent 0
if I create a new column with a placeholder of 0...
data['weighted'] = 0
When I pass a decimal value to update it in a loop (after a long series of
calculations and other stuff)...
data.ix[runner_name]['weighted'] = 45.88
...it automatically rounds the figure. Thus, the frame becomes..
winner weighted
runner_name
Steve 0 46
Joe 0 80
Marsha 1 100
Kent 0 80
How do I prevent it from rounding?
No comments:
Post a Comment