我有像start_time
,end_time
和time_taken
在几分钟内的列。我只想在time_taken
等于 10 分钟时生成一个包含完整数据的 csv 文件。
我目前的代码是:
if ( df['time_taken']) == 10:
df.to_csv(r'result.csv')
它给出了如下错误:
The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句