title: how to use np.where, where column data is not replaced
body: <p>I'm trying to use np.where to create new column based on ifs.</p>
  <pre><code>import pandas as pd 
  import numpy as np 
  
  &gt;&gt;&gt;d
  Match    X     Y  end_X  end_Y   xG  player  team    action  half
  0   Motherwell  31.1 5.5  23.9  15.3    0   6. P.McGinn Hibernian   Passes accurate 1st half
  1   Motherwell  33.1 12.7 34.6  2.9     0   5. R.Porteous   Hibernian   Passes accurate 1st half
  2   Motherwell  35.0 4.7  25.5  15.7    0   6. P.McGinn Hibernian   Passes accurate 1st half
  3   Motherwell  24.2 16.5 8.3   30.4    0   5. R.Porteous   Hibernian   Passes accurate 1st half
  4   Motherwell  4.2 58.0  60.8  64.8    0   16. L.Stevenson Hibernian   Passes accurate 1st half
  ... ... ... ... ... ... ... ... ... ... ...
  1358    Rijeka (h)  86.7    60.9    87.9    66.3    0   7. K.Magennis   Hibernian   Passes accurate 2nd half
  1359    Rijeka (h)  87.9    66.3    87.0    59.4    0   16. L.Stevenson Hibernian   Passes accurate 2nd half
  1360    Rijeka (h)  85.1    52.3    97.0    31.9    0   7. K.Magennis   Hibernian   Passes accurate 2nd half
  1361    Rijeka (h)  67.4    41.1    73.2    19.0    0   22. J.Doyle Hibernian   Passes accurate 2nd half
  1362    Rijeka (h)  73.2    19.0    62.5    1.4 0   10. M.Boyle Hibernian   Passes accurate 2nd half
  
  xo = 6.5625
  yo = 5.66
  
  dfc1 = {1:[0.001,0.002,0.002,0.002,0.003,0.004,0.004,0.004,0.002,0.002,0.002,0.001]}
  dfc1 = pd.DataFrame(dfc1)
  dfc2 = {1:[0.002,0.002,0.003,0.003,0.003,0.004,0.004,0.003,0.002,0.002,0.002,0.001]}
  dfc2 = pd.DataFrame(dfc2)
  dfc3 = {1:[0.002,0.003,0.003,0.003,0.004,0.004,0.004,0.004,0.005,0.003,0.003,0.002]}
  dfc3 = pd.DataFrame(dfc3)
  dfc4 = {1:[0.003,0.003,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.004,0.003,0.003]}
  dfc4 = pd.DataFrame(dfc4)
  dfc5 = {1:[0.003,0.004,0.004,0.005,0.005,0.005,0.005,0.005,0.005,0.005,0.004,0.004]}
  dfc5 = pd.DataFrame(dfc5)
  
  d['Start'] = np.where((d['X'] &lt; xo) &amp; (d['Y'] &lt; yo), dfc1.loc[0].values,
  (np.where((d['X'] &lt;xo)  &amp; (d['Y'] &gt; yo) &amp; (d['Y'] &lt; yo*2),dfc1.loc[1].values,
  (np.where((d['X'] &lt;xo) &amp;(d['Y'] &gt; yo*2) &amp; (d['Y'] &lt; yo*3),dfc1.loc[2].values,
  (np.where((d['X']&lt;xo) &amp;(d['Y'] &gt; yo*3) &amp; (d['Y'] &lt; yo*4),dfc1.loc[3].values,
  (np.where((d['X']&lt;xo) &amp;(d['Y'] &gt; yo*4) &amp; (d['Y'] &gt; yo*5),dfc1.loc[4].values,
  (np.where((d['X']&lt;xo) &amp;(d['Y'] &gt; yo*5) &amp; (d['Y'] &gt; yo*6), dfc1.loc[5].values,
  (np.where((d['X']&lt;xo) &amp;(d['Y'] &gt; yo*6) &amp; (d['Y'] &gt; yo*7),dfc1.loc[6].values,
  (np.where((d['X']&lt;xo) &amp;(d['Y'] &gt; yo*7) &amp; (d['Y'] &gt; yo*8),dfc1.loc[7].values,
  (np.where((d['X']&lt;xo) &amp;(d['Y'] &gt; yo*8) &amp; (d['Y'] &gt; yo*9),dfc1.loc[8].values,
  (np.where((d['X']&lt;xo) &amp;(d['Y'] &gt; yo*9) &amp; (d['Y'] &gt; yo*10),dfc1.loc[9].values,
  (np.where((d['X']&lt;xo) &amp;(d['Y'] &gt; yo*10) &amp; (d['Y'] &gt; yo*11),dfc1.loc[10].values,
  (np.where((d['X']&lt;xo) &amp;(d['Y'] &gt; yo*11) &amp; (d['Y'] &gt; yo*12),dfc1.loc[11].values,
  (np.where((d['X'] &gt; xo) &amp; (d['X'] &lt; xo*2) &amp; (d['Y'] &lt; yo),dfc2.loc[0].values,
  </code></pre>
  <p>The issue I face with np.where -  is that I get an error that states I've used too many parentheses, but the code requires me to use about 190+
  But if I was to split it up into multiple <code>np.where</code> then it would overwrite the data already in that column.
  Is there anyway around me using multiple instances of <code>np.where</code> without overwriting the data?</p>