我试着把binance,binanceAmount,livecoin,livecoinAmount,…,procent列四舍五入。我从csv导入数据。这是前10行:
这是我的代码:
decimals = {}
for exchange in usableExchanges:
decimals[exchange] = 8
decimals[exchange + "amount"] = 2
df.round(decimals)
df.round({'profit': 1, 'procent': 2})
Tags:
您可以分配给字典并将输出分配给
DataFrame
:样本:
相关问题 更多 >
编程相关推荐