这一列的数据只需要/前的部分,该怎么做呢
问题描述:
又来提问了????????救救这个小菜鸟大佬们
答
df['cate'].str.split('/',expand=True)[0]
df['cate'].str.split('/',expand=True)[0]