下面是我的档案的样子-
User,Rights,Login_date
A,Admin,12-SEP-23
A,Accountant,01-SEP-23
B,Admin,05-SEP-23
B,Clerk,31-AUG-23
=============================
过滤后的预期输出应为-
User Rights Login_date
A,Admin|Accountant,12-SEP-23
B,Admin|Clerk,05-SEP-23
我能够过滤重复,但无法管道的权利。
enter image description here
1条答案
按热度按时间t30tvxxf1#
下面是一个Ruby,它内置了CSV解析器,可以做到这一点:
图纸: