方法一:
df=df.drop('cont', axis=1).join(df['cont'].str.split('/', expand=True).stack().reset_index(level=1, drop=True).rename('tag'))
方法二:
df=df['cont'].str.split('/', expand=True).stack().reset_index(level=0).set_index('level_0').rename(columns={0:'tag'}).join(df.drop('cont', axis=1))
参考:
https://blog.csdn.net/fjssharpsword/article/details/78405602
https://zhuanlan.zhihu.com/p/28337202