如何在 pandas 中使用 read_csv 时删除各自列字段中的逗号和数据

问题描述 投票:0回答:0

enter image description here 我正在使用下面提到的代码。

import pandas as pd
data=pd.read_csv('file_path',sep="\t")

如何在各自的列下以表格格式获取这些数据,删除“,”。删除 sep 会导致错误并使用另一个更改 sep=" " 也会导致错误。

我尝试使用其他 other sep="," 但这会导致错误,同时使用多个 sep as sep=" |,|"也是原因和错误。

python pandas machine-learning artificial-intelligence read.csv
© www.soinside.com 2019 - 2024. All rights reserved.