S
S
san_m_m2021-09-05 14:12:50
Python
san_m_m, 2021-09-05 14:12:50

How to round up a DataFrame column?

Good afternoon!

I just can't figure out how to round a column in a DataFrame up.

state = ['California', 'Texas', 'New York', 'Florida', 'Illinois']
area = [423967.3, 695662.2, 141297.5,  170312.6, 149995.2]


What needs to be added to the round() method to make it round up?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2021-09-05
@san_m_m

math.ceil

>>> import math
>>> math.ceil(4.1)
5

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question