如何删除'/‘和后面的'/’值,即25?
示例:
   score
    10
    24
    19
    20/25
    18/25
    16/25输出:
score
10
24
19
20
18
16发布于 2021-04-20 18:49:05
你可以在这里使用df.replace函数。
df['score'] = df['score'].replace('/.*','',regex=True)df将如下所示:
    score
0   10
1   24
2   19
3   20
4   18
5   16https://stackoverflow.com/questions/67177326
复制相似问题