title: Convert a string with brackets to numpy array
body: <h2>Description of the problem:</h2>
  
  <p>I have an array-like structure in a dataframe column as a string (I read the dataframe from a csv file).</p>
  
  <p>One string element of this column looks like this:</p>
  
  <pre><code>In  [1]: df.iloc[0]['points']    
  Out [2]: '[(-0.0426, -0.7231, -0.4207), (0.2116, -0.1733, -0.1013), (...)]'
  </code></pre>
  
  <p>so it's really an array-like structure, which looks 'ready for numpy' to me. </p>
  
  <p><code>numpy.fromstring()</code> doesn't help as it doesn't like brackets:<br>
  <a href="https://stackoverflow.com/questions/38886641/convert-string-representation-of-array-to-numpy-array-in-python">convert string representation of array to numpy array in python</a></p>
  
  <p>A simple <code>numpy.array()</code> on the string itself, if I copy and paste it in the <code>array()</code> function is returning me a numpy array.<br>
  But if I fill the <code>array()</code> function with the variable containing the string like that: <code>np.array(df.iloc[0]['points'])</code> it does not work, giving me a <code>ValueError: could not convert string to float</code> </p>
  
  <p><a href="https://stackoverflow.com/questions/28207743/convert-string-to-numpy-array">Convert string to numpy array</a></p>
  
  <h2>The question:</h2>
  
  <p>Is there any function to do that in a simple way (without replacing or regex-ing the brackets)?</p>