2024-05-05 17:13:11 发布
网友
我需要从某些行中删除“-”: df:
description - Fallo en el sensor del yaw - Error enrollamiento máximo Cannot couple without polo test
预期产出:
description Fallo en el sensor del yaw Error enrollamiento máximo Cannot couple without polo test
可以使用“replace方法将“-”替换为空字符串,如下所示-
df["description"].replace({"- ": ""}, inplace = True, regex = True)
请注意,您必须使用“-”而不是“-”,因为您的数据中有带尾随空格的“-”
可以使用“replace方法将“-”替换为空字符串,如下所示-
请注意,您必须使用“-”而不是“-”,因为您的数据中有带尾随空格的“-”
相关问题 更多 >
编程相关推荐