所以我有一个CSV文件,我需要将它插入API,但其中一列是美元,我想通过乘以100将它转换为美分
这是文件
tripId,scooterId,userId,totalDuration,pickUpTime,dropOffTime,userLocationAtBooking.0,userLocationAtBooking.1,userLocationAtDropOff.0,userLocationAtDropOff.1,totalFare
18721,927,38579,45,2021-08-22 03:00:49,2021-08-22 03:45:39,24.76412,46.6493,24.76409833,46.64934,9.58
18722,434,38563,45,2021-08-22 03:01:16,2021-08-22 03:45:39,24.76412,46.64933333,24.76407,46.64933333,13.53
18723,876,38554,33,2021-08-22 03:05:57,2021-08-22 03:38:55,24.71392833,46.660645,24.7097,46.66272,0.67
18724,476,32291,65,2021-08-22 03:14:37,2021-08-22 04:18:56,24.77137833,46.64568667,24.7722,46.64523167,32.35
我只需要做最后一栏“totalFare”的数学运算
我还是python新手,因此非常感谢您的帮助
如果还不清楚如何执行该任务,这里有一个使用基本Python的实现
输出(使用示例输入)
使用Python模块的替代方案(更短的解决方案)
相关问题 更多 >
编程相关推荐