缩短数据集的长度
我有一个像这样的数据集,继续进行了数千行,我试图实现的一种方法是缩短数据集的一种方法,因此,在数据集包含多行,同一层在连续左右左上左上列出了相同的层和屁股行。在这种情况下,将是什么意思:
borid | depth1 | depth2 | layer |
---|---|---|---|
b1(192.2215) | 0.1 | 0.8 | S |
B1(192.2215) | 0.8 2.4 | 2.4 2.4 | ml |
b1(192.2215)(192.2215) | 2.4 | 3.9 3.9 3.9 | 3.9 3.9 3.9 3.9 |
B1(192.2215) | 3.9 | 10.7 | ML |
B1(192.2215) | 10.7 | 13.5 | S |
是否有任何方法可以实现从每个DEAPTH1获得最低值的最低值,而从每个DEAPTH2的最高值则是相同的值?
Borid是一个独特的钥匙
I have a dataset like this, goes on for many thousands of rows, what im trying to achive is a way to shorten the dataset so in the case that the dataset contains multiple rows with the same layer sort in a row im left with the top and buttom rows. In this case what would mean something like this:
BorID | Depth1 | Depth2 | Layer |
---|---|---|---|
B1(192.2215) | 0.1 | 0.8 | S |
B1(192.2215) | 0.8 | 2.4 | ML |
B1(192.2215) | 2.4 | 3.9 | S |
B1(192.2215) | 3.9 | 10.7 | ML |
B1(192.2215) | 10.7 | 13.5 | S |
Is there any way to achive that getting the lowest value from each Deapth1 and the highest value from each Deapth2 if Layer is the same value?
BorID is a unique key
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试此
(a)创建所有行的偏移,以便我可以与(b)下方的值进行比较,如果borid或layer有差异,然后使用rowID,否则使用null(c)填写新列(d) )该列和分组中的组在该表(e)的第一行和最后一行中创建表(e)的最后一行,然后删除额外的列
Try this
(a) created an offset of all rows so I can compare to values of row beneath (b) if there is a difference in BorID or Layer then use the RowID, otherwise use null (c) fill that new column down (d) group on that column and in the grouping, create table from first row and last row of that table (e) expand and remove extra column