根据行中的字符值提取特定列
我有一个在第一行中包含字符的数据,如下所示,
J K L M N O P
A T F T F F F T
B 14 15 10 2 3 4 78
C 10 47 15 9 6 12 12
D 17 44 17 1 0 15 11
E 3 12 14 3 2 15 17
我只想提取 A 行中包含值“T”的列,
所以我想要的结果是这样的:
J L P
A T T T
B 14 10 78
C 10 15 12
D 17 17 11
E 3 14 17
另外,在第二次,我想知道如何使用两个条件执行相同的操作,例如:提取 A 列中包含值“T”和 D 行中包含值 17 的所有列,因此结果将是:
J L
A T T
B 14 10
C 10 15
D 17 17
E 3 14
谢谢
I have a data that contains character in the first row like this
J K L M N O P
A T F T F F F T
B 14 15 10 2 3 4 78
C 10 47 15 9 6 12 12
D 17 44 17 1 0 15 11
E 3 12 14 3 2 15 17
i want to extract only the columns that contain the value "T" in row A
so the result i want is this :
J L P
A T T T
B 14 10 78
C 10 15 12
D 17 17 11
E 3 14 17
also, in second time, i want to know how to do the same thing using two conditions, for example : extract all columns that contain value "T" in column A and value 17 in row D so the result will be :
J L
A T T
B 14 10
C 10 15
D 17 17
E 3 14
Thank you
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是你的答案。
您可以使用索引来过滤列。它支持逻辑语句,您可以将它们与
&
组合起来。Here is your answer.
You can use index to filter columns. It supports logical statements and you can combine them with
&
.