I'm totally new to python.
I have a csv file. Its structure is:
Ip, Tag, Sentence_id, scheme
#1, yes, 1, 1
#1, yes, 2, 2
#2, no, 1, 1
#3 maybe, 3, 3
There are 100 sentence_id, a number of ips and 6 schemes (1-6).
Is there a way with python to restructure the csv so that it's output is a matrix of the following structure:
Ip, scheme 1, scheme 2, scheme 3, sentence_id
#1 yes, NA, NA, 1
#1 NA, yes, NA, 2
#2 no, NA, NA, 1
#3 NA, NA, maybe, 3
I'm not sure if python is the "right" language to use for something like this. I've been guided to either python or awk, but have no idea of either. Thanks.