I have a dataframe with a column for app user-agents. What I need to do is to identify the particular app from this column. For example,
NewWordsWithFriendsFree/2.3 CFNetwork/672.1.15 Darwin/14.0.0
will be categorized in Words With Friends
.
iPhone3,1; iPhone OS 7.1.2; com.fingerarts.sudoku2; 143441-1,24 will be Sudoku by FingerArts etc.
I will have another dataframe with the strings I need to match. For example,
Keyword Game
NewWordsWithFriends Words With Friends
com.fingerarts.sudoku Sudoku by FingerArts
How do I do the lookup like this for a pandas dataframe? The dataframe for example is like
user date user-agent
A 2015-09-02 13:45:56 NewWordsWithFriendsFree/2.3 CFNetwork/672.1.15 Darwin/14.0.0
B 2015-08-31 23:04:21 iPhone3,1; iPhone OS 7.1.2; com.fingerarts.sudoku2; 143441-1,24
I want a new column GameName
after the lookup.