我在数据框中有超过1000行类似这样的url
我的数据帧中有df['profile']列
http://pbs.twimg.com/profile_images/797804071063343105/KPytXWtY_normal.jpg
http://pbs.twimg.com/profile_images/903374198009188353/pDuYl5Uk_normal.jpg
http://pbs.twimg.com/profile_images/1101088756432396290/5bzisDRx_normal.png
我只需要从python中的图片url中删除\u normal
我试过这个,但不起作用
df.profile.str.replace(r'_normal', r'')
当我应用这条线时,我得到了行中的轮廓图像。而不是用上一个值替换新值
目前没有回答
相关问题 更多 >
编程相关推荐