title: Grouping the values of all columns by index of a pandas dataframe
body: <p>I want to basically build a distribution of total no. of videos a user has watched. Watch is signified by 1 else 0. Users are index of the data frame. </p>
  
  <p>Assume the data is like this: </p>
  
  <pre><code>A   B   C
  User1   1   1   0
  User2   0   1   0
  User3   1   0   1
  </code></pre>
  
  <p>I want for each use a count of all the 1 in that row. </p>
  
  <p>I am doing something like this but it doesn't seem to work. I dont want to use some applymap function as that seem to be slow. </p>
  
  <pre><code>d.groupby(d.index).sum(axis=1)
  </code></pre>
  
  <p>Gives error that axis not recognized </p>