title: multiply column (array column) datafame by a vector
body: <p>I try to multiply a dataframe column (array column)  by vector.</p>
  <p>I get results  from my query from dataframe,and  try to multiply each element o array by the same element in Vect.</p>
  <pre><code>import numpy as np
  #import math
  import pandas as pd
  
  #function to multiply dataframe column by vect 
  
   
  def vect_dataframe(vect, mat,  numberlines
  ,  numbercolumns):
      #mat= np.matrix([[2, 6, 8],[2, 6, 8]])
      dim_mat1,dim_mat2 = mat.shape
      dim_vect = vect.shape[0]
  
      dim2_Min = min(dim_mat2 , dim_vect)
  
      result = np.tile(0,(numberlines, numbercolumns))
  
      i = 0
      for i in range(dim_mat1):
          j = 0
          for j in range(dim2_Min):
              result[i, j] = vect[j] * mat[i, j]
              j=j+1
          
          i=i+1
      return result
  </code></pre>
  <p>second Method</p>
  <pre><code>#get a rows 
  def get_Rows_from_df(df_source,
              filter_column1,
              filter_column4,
              filtername):
  
      df_results = df_source.loc[(df_source['Column2']  == filtername) &amp;(df_source['Column4'] ==filter_column4) &amp; (df_source['Column1'] ==filter_column1)].copy(deep=True).reset_index()    
  
      return df_results[['Values']].values
  
  </code></pre>
  <p>i write a basic script to explain you my subject</p>
  <pre><code>#test
  filter_column4 = 0
  filter_column1 ='p1'
  ratio = 2
  results = pd.DataFrame([
  ['p1', 'v1', 1, 0 ,np.array([5,2, 1])], 
  ['p1', 'v1', 2, 0 ,np.array([1,3, 4])],
  ['p1', 'v1', 1, 1 ,np.array([1,3, 4])],
  ['p1', 'v1', 2, 1 ,np.array([1,3, 4])],
  ['p1', 'v2', 1, 0 ,np.array([1,3, 4])],
  ['p1', 'v2', 2, 0 ,np.array([1,3, 4])],
  ['p1', 'v2', 2, 1 ,np.array([1,3, 4])],
  ['p1', 'v2', 1, 1 ,np.array([1,3, 4])]]    ,columns=['Column1', 'Column2', 'Column3', 'Column4', 'Values'])
  #
  values = get_Rows_from_df(results, filter_column1, filter_column4, 'v1')
  test =np.array([14,3, 9])
  values_multipy_vector = vect_dataframe(test,values,2,5)
  print(values_multipy_vector)
  
  </code></pre>
  <p>I think this is a very simple way to that
  maybe Pandas give us a simple method to do that</p>
  <p>any IDEAS?</p>