title: slicing rows from csv file
body: <p>I'm trying to read a csv file in python and build a data frame from it. 
  Here is an example of a row from my csv file:</p>
  
  <p>|ab/5 (cd ef 6| text1/123 (lala| ghj) lal/1234/567|   </p>
  
  <p>I would like to slice the row and assign each element to a column.
  The row should look sit in the data frame like so:</p>
  
  <pre><code>col1 |  col2                     | col3
  ab/5 | (cd ef 6| text1/123 (lala | ghj)
  </code></pre>
  
  <p>Setting up a distributor while opening the file in excel is pointless because sometimes '|' appears in place, in which case it should not be split.
  For the first element ab/5 I was trying to do it like this:</p>
  
  <pre><code>with open('actions2.csv', 'r') as csvfile_actions2:
      reader = csv.reader(csvfile_actions2)
      for row in reader:
          row2=row[0:23].split('|')
          print(row2)
  </code></pre>
  
  <p>However, an error occurred:</p>
  
  <pre><code>AttributeError: 'list' object has no attribute 'split'
  </code></pre>
  
  <p>Does anyone have an idea how to solve this?</p>