title: how to sum rows with condition? (pandas)
body: <p>i have this df</p>
  <pre><code>data={&quot;col1&quot;:[&quot;n&quot;,3,&quot;n&quot;,5,&quot;n&quot;,2,6],
  &quot;col2&quot;:[4,&quot;n&quot;,4,6,&quot;n&quot;,&quot;n&quot;,5],
  &quot;col3&quot;:[7,&quot;n&quot;,0,&quot;n&quot;,&quot;n&quot;,6,7],
  &quot;col4&quot;:[14,11,22,8,6,&quot;n&quot;,9],
  &quot;col5&quot;:[0,5,&quot;n&quot;,3,8,&quot;n&quot;,9],
  &quot;type&quot;:[&quot;B&quot;,&quot;n&quot;,&quot;n&quot;,&quot;n&quot;,&quot;B&quot;,&quot;A&quot;,&quot;B&quot;],
  &quot;number&quot;:[&quot;one&quot;,&quot;n&quot;,&quot;n&quot;,&quot;n&quot;,&quot;one&quot;,&quot;two&quot;,&quot;n&quot;]}
  df=pd.DataFrame.from_dict(data)
  print(df)
  </code></pre>
  <p>i like to have new column that sum all &quot;n&quot; in evry row/
  Something like this maybe:</p>
  <pre><code>df[&quot;sum_n&quot;]=df[[&quot;list of all col&quot;]].sum(&quot;n&quot;,axis=)
  </code></pre>
  <p>its need to look like this</p>
  <pre><code>data={&quot;col1&quot;:[&quot;n&quot;,3,&quot;n&quot;,5,&quot;n&quot;,2,6],
  &quot;col2&quot;:[4,&quot;n&quot;,4,6,&quot;n&quot;,&quot;n&quot;,5],
  &quot;col3&quot;:[7,&quot;n&quot;,0,&quot;n&quot;,&quot;n&quot;,6,7],
  &quot;col4&quot;:[14,11,22,8,6,&quot;n&quot;,9],
  &quot;col5&quot;:[0,5,&quot;n&quot;,3,8,&quot;n&quot;,9],
  &quot;type&quot;:[&quot;B&quot;,&quot;n&quot;,&quot;n&quot;,&quot;n&quot;,&quot;B&quot;,&quot;A&quot;,&quot;B&quot;],
  &quot;number&quot;:[&quot;one&quot;,&quot;n&quot;,&quot;n&quot;,&quot;n&quot;,&quot;one&quot;,&quot;two&quot;,&quot;n&quot;],
  &quot;sum_n&quot;:[1,4,4,3,3,3,1]}
  df=pd.DataFrame.from_dict(data)
  df
  </code></pre>