title: Matrix multiplication between pandas dataframe
body: <p>I am attempting to find dot product between a dataframe and a column vector (another dataframe).
  The dataframe looks like below:</p>
  <pre><code>df = pd.DataFrame([
      [0,23,0, 0, 1,0],
      [1,33,1, 0, 0,0],
      [2,40,1, 0, 1,1]],
      columns=['SN','Age',  'Nice_540', 'Nice_200', 'Nice_153','Nice_124'])
  
  SN   |Age |Nice_540 |Nice_200| Nice_153|Nice_124|
  ----|-----|--------|--------|----------|--------|
  0   |  23 |    0   |    0   |     1    |   0    |
  1   |  33 |    1   |    0   |     0    |   0    |
  2   |  40 |    1   |    0   |     1    |   1    |
  
  </code></pre>
  <p>I want the rows to matrix multiply numbers of last four column headings (540; 200, etc) so that the last column &quot;FINAL&quot; looks like this after matrix multiplication:</p>
  <pre><code>SN  | Age |Nice_540 |Nice_200| Nice_153|Nice_124|FINAL   |
  ----|-----|--------|--------|----------|--------|--------|
  0   |  23 |    0   |    0   |     1    |   0    |   153  |
  1   |  33 |    1   |    0   |     0    |   0    |   540  |
  2   |  40 |    1   |    0   |     1    |   1    |   817  |
  
  </code></pre>
  <p>I have got the first two numbers in the last column right (153 and 540); but for the last one I am getting 540153124 and not 817 as would be expected from dot product.</p>
  <p>This is what I have done so far:</p>
  <pre><code>AAAA = df.columns.to_list()
  
  AAAA = str(AAAA)
  string_pattern = r&quot;\d{3}&quot;
  regex_pattern = re.compile(string_pattern)
  BBBB = regex_pattern.findall(AAAA)
  
  cols=df.filter(regex='Nice_',axis=1).columns
  
  seR = pd.DataFrame(BBBB,index=cols)
  
  df[&quot;FINAL&quot;] = df[cols].dot(seR)
  
  </code></pre>
  <p>What am I doing wrong to get 540153124 and not 817? Thanks in advance.</p>