【发布时间】:2019-11-18 20:37:44
【问题描述】:
我是python新手,我想将包含电影名称和发行年份的一列中的数据分成多列,所以我找到了拆分功能。
数据按标题(年份)组织。
我在 python 中尝试的是:
movies['title'].str.split('(', 1, expand = True)
以下情况发生异常:
City of Lost Children, The (Cité des enfants perdus, La) (1999)
失落儿童之城,The。 Cité des enfants perdus, La) (1999)
我所期望的只是 1999 年)进入第二列。
我需要你的帮助!
【问题讨论】:
-
请分享数据框样本和预期输出