I have a data frame that looks like this:
speaker subject verb tfidf
0 man i learn 51.775912
1 man he mean 51.195231
2 man she spend 48.590691
3 woman i learn 47.025810
4 woman he decide 46.472787
Two sets of speakers (men and women), each using three pronouns which are then paired with a variety of verbs, but the verbs overlap. I would like to reshape this data frame such that each verb is its own row and then there is a set of three columns for men and three columns for women. The three columns would be for the three pronouns -- he, she, i -- and their values would be the TFIDF scores.
SPEAKER man woman
PRONOUN i he she i he she
VERB
learn 45 34 12 34 45 32
decide ## ## ## etc
I have looked at countless SO pages, Youtube videos, and scanned the pages of Effective Pandas to no avail. pandas has me beaten. Any advice here would be most appreciated.