[英]find the max value of each column with spatial range of row in DataFrame
I want to code my Sliding Window and I have a huge data shep like this feature x ab c dg 1 2 3 4 5 6 2 4 5 6 9 4我想对我的滑动 Window 进行编码,并且我有一个像这个功能这样的庞大数据集 x ab c dg 1 2 3 4 5 6 2 4 5 6 9 4
3 6 7 8 6 0 4 2 3 5 7 9 5 2 2 2 2 2 enter image description here and label y 0 1 1 2 0 I want to define df with the same columns and zipping every 3 rows in one with the max value of each column --> this for feature x and define df2 with the same column and zipping every 3 rows in one with the most frequent. 3 6 7 8 6 0 4 2 3 5 7 9 5 2 2 2 2 2在此处输入图像描述和 label y 0 1 1 2 0我想用相同的列定义 df 并用最大值每 3 行压缩一次每列的 -> 这对于特征 x 并使用相同的列定义 df2 并以最频繁的方式每 3 行压缩一次。
there someone can help me:(有人可以帮助我:(
the first row maybe like this 6 7 8 9 6 with label 1第一行可能像这样 6 7 8 9 6 label 1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.