熊猫按一列分组并将正则表达式应用于另一列

时间:2019-11-05 22:52:15

标签: python-3.x

我想按“索引”列进行分组,并将正则表达式应用于“名称”列。如果名称的前两个字符与给定索引匹配,则返回label为“ TRUE”,否则返回label为“ False”。

输入:- enter image description here

输出:- enter image description here

0 个答案:

没有答案