我如何将数据框架中一列中的数字四舍五入到小数点后两位?
df的名字是tax_data,我想取整的列叫做rate_percent。
我试着用。
format(round(rate_percent ,2), nsmall =2) but this didn't work.
有人有什么建议吗?
这里,在Base-R中
tax_data$rate_percent <- round(tax_data$rate_percent ,2)