小编All*_*lly的帖子

Compare elements in dataframe columns for each row - Python

I have a really huge dataframe (thousends of rows), but let's assume it is like this:

   A  B  C  D  E  F
0  2  5  2  2  2  2
1  5  2  5  5  5  5
2  5  2  5  2  5  5
3  2  2  2  2  2  2
4  5  5  5  5  5  5
Run Code Online (Sandbox Code Playgroud)

I need to see which value appears most frequently in a group of columns for each row. For instance, the value that appears …

python dataframe pandas

5
推荐指数
1
解决办法
114
查看次数

标签 统计

dataframe ×1

pandas ×1

python ×1