有这样的一个表
| id | updated | place | gap |
| us7000asa5 | 2020-07-21 | 238 km WSW of Qamdo, China | 111 |
| us7000as5w | 2020-07-21 | 237 km WSW of Qamdo, China | 65 |
| us7000as36 | 2020-07-22 | 273 km SE of Hotan, China | 105 |
| us7000aru9 | 2020-07-16 | Yunnan, China | 47 |
| us7000ar7l | 2020-06-11 | 60 km NE of Weining, China | 31 |
删除具体行
删除表中的特定行
df.drop('us7000aru9')
删除表中的特定列
df.drop('place',axis=1)
根据索引删除行
df.drop(df.index[2])
根据数值删除行
df(df['gap'] > 40)
删除包含指定字符的行
df[ ~ df['place'].str.contains('China') ] //~ 是eng输入法中的shift+`
取出包含指定字符的行
df[df['place'].str.contains('China')]
留下评论