title: Cannot cast array data from dtype('int64') to dtype('int32') according to the rule 'safe'
body: <p>I have the data similar to this dictionary and I am working on Win32 bit Win7 machine. </p>
  
  <p>Following code working fine on Win64 bit Win10 but not in Win32. </p>
  
  <p>I am getting this "TypeError: Cannot cast array data from dtype('int64') to dtype('int32') according to the rule 'safe'" if I run this on Win32 Win7. </p>
  
  <p>I searched the answer everywhere and not sure where to put the .astype('int32') codes. in my code.</p>
  
  <p>What I wanted to achieve was there are rows, for this case, 4th row, under PA column, data is with comma, I would like to split them into next row as well as respective columns "var2" and "var3". Something like this in separate row d with var2=2 and var3=65. Then, in another row, e with var2=2 and var3=65, then in another row, f is with var2=2 and var3=65.</p>
  
  <p>Can someone please help me with this? Thanks millions.</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  a = DataFrame([{'PA': 'a', 'var2': 1, 'var3': 3},
                 {'PA': 'b', 'var2': 3, 'var3': 54},
                 {'PA': 'c', 'var2': 54,'var3': 3},
                 {'PA': 'd,e,f', 'var2': 2, 'var3':65}])
  
  lst_col = 'PA'
  x = a.assign(**{lst_col:a[lst_col].str.split(',')})
  
  TS1 = pd.DataFrame({
           col:np.repeat(x[col].values, x[lst_col].str.len())
         for col in x.columns.difference([lst_col])}).assign(**{lst_col:np.concatenate(x[lst_col].values)})[x.columns.tolist()]
  </code></pre>
  
  <p>error:</p>
  
  <pre><code>TypeErrorTraceback (most recent call last)
  &lt;ipython-input-12-4f61e3646357&gt; in &lt;module&gt;()
       11 TS1 = pd.DataFrame({
       12          col:np.repeat(x[col].values, x[lst_col].str.len())
  ---&gt; 13        for col in x.columns.difference([lst_col])}).assign(**{lst_col:np.concatenate(x[lst_col].values)})[x.columns.tolist()]
       14 
  
  &lt;ipython-input-12-4f61e3646357&gt; in &lt;dictcomp&gt;((col,))
       11 TS1 = pd.DataFrame({
       12          col:np.repeat(x[col].values, x[lst_col].str.len())
  ---&gt; 13        for col in x.columns.difference([lst_col])}).assign(**{lst_col:np.concatenate(x[lst_col].values)})[x.columns.tolist()]
       14 
  
  D:\Users\gexakz\AppData\Local\Continuum\anaconda2\lib\site-packages\numpy\core\fromnumeric.pyc in repeat(a, repeats, axis)
      421 
      422     """
  --&gt; 423     return _wrapfunc(a, 'repeat', repeats, axis=axis)
      424 
      425 
  
  D:\Users\gexakz\AppData\Local\Continuum\anaconda2\lib\site-packages\numpy\core\fromnumeric.pyc in _wrapfunc(obj, method, *args, **kwds)
       60     # a downstream library like 'pandas'.
       61     except (AttributeError, TypeError):
  ---&gt; 62         return _wrapit(obj, method, *args, **kwds)
       63 
       64 
  
  D:\Users\gexakz\AppData\Local\Continuum\anaconda2\lib\site-packages\numpy\core\fromnumeric.pyc in _wrapit(obj, method, *args, **kwds)
       40     except AttributeError:
       41         wrap = None
  ---&gt; 42     result = getattr(asarray(obj), method)(*args, **kwds)
       43     if wrap:
       44         if not isinstance(result, mu.ndarray):
  
  TypeError: Cannot cast array data from dtype('int64') to dtype('int32') according to the rule 'safe'
  </code></pre>