title: Python, Pandas: What it is the best way to separate string into several columns?
body: <p>I want to split one string into several columns however I encounter issue with <code>str.split</code> method.</p>
  <p>Example:
  While performing <code>str.split</code> on column <code>Name</code> which consist such strings it work as expected.</p>
  <pre><code>data1 = {'Name': ['Alice 23', 'Philip 12', 'Krish 64', 'John 29']}
  df1 = pd.DataFrame(data1)
  df1
      Name
  0   Alice 23
  1   Philip 12
  2   Krish 64
  3   John 29
  </code></pre>
  <p>performing split:</p>
  <pre><code>df1[['Name', 'age']] = df1['Name'].str.split(' ', 1, expand=True)
  df1
  
  Name    age
  0   Alice   23
  1   Philip  12
  2   Krish   64
  3   John    29
  
  </code></pre>
  <p>All good, as I wanted but if I need to place other separator like <code>||</code> its not working properly.</p>
  <pre><code>data2 = {'Name': ['Alice||23', 'Philip||12', 'Krish||64', 'John||29']}
  df2 = pd.DataFrame(data)
  df2
  
      Name
  0   Alice||23
  1   Philip||12
  2   Krish||64
  3   John||29
  </code></pre>
  <p>performing split...</p>
  <pre><code>df2[['Name', 'age']] = df2['Name'].str.split('[||]',1,expand = True)
  df3[['Name', 'age']] = df2['Name'].str.split('||',1,expand = True)
  </code></pre>
  <p>results in not what I expected</p>
  <pre><code>df2
      Name    age
  0   Alice   |23
  1   Philip  |12
  2   Krish   |64
  3   John    |29
  
  df3
  
  Name    age
  0       Alice||23
  1       Philip||12
  2       Krish||64
  3       John||29
  </code></pre>
  <p>What's the reason for this behaviour and how get expected result which is as <code>df1</code>?</p>