📜  pandas 从数据帧中删除多头 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:45.381000             🧑  作者: Mango

代码示例1
df = pd.read_table('yourfile.csv', header=None, delim_whitespace=True, skiprows=1)
df.columns = ['0','POSITION_T','PROB','ID']
del df['0']

# filtering out the rows with `POSITION_T` value in corresponding column
df = df[df.POSITION_T.str.contains('POSITION_T') == False]

print(df)