I have a dataframe like image1. I want to convert it to image2.
I have tried r, python, and excel but failed. Excel formula: =INDEX(AV2:AW2,MODE(MATCH(AV2:AW2,AV2:AW2,0))) give me N/A output.
the "k2" column would be the most common element from "knumbers" column. Any Help. Best, Zillur
[![image1](https://i.stack.imgur.com/O7SkM.png)](https://i.stack.imgur.com/O7SkM.png)

[![image2](https://i.stack.imgur.com/obB56.png)](https://i.stack.imgur.com/obB56.png)