EXPAND ALL
  • Home

round

Rounds the float to the nearest decimal place and returns value as a string. Used to clean up the data shown in tables. Set decimals to 0 if you want to round to the nearest int value.

Returns: STRING

Float rounded to the specified decimal place as a string.

Arguments

VariableTypeDescription
valueFLOAT64The value to round.
decimalsINT64Number of decimal places to round to. `0` => round to nearest int.

Examples:

df.cpu1 = 0.248
df.cpu1 = px.round(df.cpu1, 2) # 0.25
This site uses cookies to provide you with a better user experience. By using Pixie, you consent to our use of cookies.