title: how to compare values of pandas dataframe column with variable to get the sume when both the values are same?
body: <p>I want to compare the value of variable with the values in column of pandas dataframe and  want to calculate the sum when both the values are same.</p>
  
  <p>i tried the compare method that we usually use and .sum() function of pandas to get sum</p>
  
  <pre><code>dayofwk = 4
  df = df_myinput['day_of_week']
  abc=  df[(df == dayofwk)].sum()
  print(abc)
  </code></pre>
  
  <p>eg
  if df is {0.4.5.6.7.3.8.9.2.5.4.6.4.7.9}</p>
  
  <p>then abc must show output as 12</p>