Voglio turno pandas.DataFrame
.Il modo giusto per arrotondare pandas.DataFrame?
Ecco quello che ho provato finora:
import pandas as pd
data = pd.DataFrame([1.4,2.5,3.8,4.4,5.6],[6.2,7.6,8.8,9.1,0])
print(round(data))
Ma quando ho eseguito questo codice, ottengo il seguente errore:
Traceback (most recent call last):
File "C:\Users\*****\Documents\*****\******\****.py", line 3, in <module>
print(round(data))
TypeError: type DataFrame doesn't define __round__ method
Qual è il modo giusto per arrotondare pandas.DataFrame
?
Dup di http://stackoverflow.com/q/19100540/564538 –