I have a CSV file which is the result of running topic modeling on a series of texts.
Code:
TextID Topic 1 Topic 2 Topic 3 Topic 4 Topic 5
Text1 0.013935811 0.013935917 0 0 0.788958907 0
Text2 0 0.012022536 0 0 0.961937606 0
Text3 0.067361109 0.08958181 0 0 0.822918177 0
The idea is that the algorithm I have extracts a series of topics from the texts and looks at how similar the sampled texts (Text1, Text2, Text3) are to the 'model'. The numbers are odd because there are more topics than this. There are also lots of rows, hence the need of a different solution.
Clearly, this makes it for a difficult reading. Is there a way to look for the highest value in a number of columns within a row and move it to a another column in the row? The idea would be that, if the highest value pertains to Topic 3, a new column would be created in the same row, reading "Topic 3". Does it make any sense? Is this even possible?
I thought so, and this seemed to answer my question, but I can't seem to make it work:
https://www.extendoffice.com/documen...umn-title.html
Thanks!