pandas 只保留某列中的数字

知识点:str.extract()函数

df5['n'] = df5['n'].str.extract('(d+)', expand=False)

原文地址:https://www.cnblogs.com/yu121/p/12963245.html