import pandas as pd
df = pd.read_csv('data2.csv')
for x in df.index:
if df.loc[x, "Duration"] > 120:
df.drop(x, inplace = True)
# 记得包含 'inplace = True' 参数,以便在原始 DataFrame 对象上进行更改,而不是返回副本
print(df.to_string())