title: How can I know the most frequent value from different users in a dataframe?
body: <p>A dataframe 'df' records the purchasing channels of different orders of users:</p>
  
  <pre><code>  user_id channel
  0       a      TV
  1       a      TV
  2       a      TV
  3       a     WEB
  4       a     WEB
  5       b     APP
  6       b     APP
  7       b      TV
  8       b      TV
  9       b     WEB
  10      c     WEB
  11      c     WEB
  12      c     WEB
  13      c      TV
  14      c      TV
  </code></pre>
  
  <p>Now I want to know the most common channels diffent users used. The expected output should be:</p>
  
  <pre><code>  user_id frequent
  0       a       TV
  1       b      APP
  2       c      WEB
  </code></pre>
  
  <p>If there are multiple results, choose the 1st one. For example, for user 'b', he has 2 orders from 'APP' and 2 from 'TV'. We choose 'APP' here</p>
  
  <p>I also want the result combined with the original 'df' with transform (maybe):</p>
  
  <pre><code>  user_id channel frequent
  0       a      TV       TV
  1       a      TV       TV
  2       a      TV       TV
  3       a     WEB       TV
  4       a     WEB       TV
  5       b     APP      APP
  6       b     APP      APP
  7       b      TV      APP
  8       b      TV      APP
  9       b     WEB      APP
  10      c     WEB      WEB
  11      c     WEB      WEB
  12      c     WEB      WEB
  13      c      TV      WEB
  14      c      TV      WEB
  </code></pre>