title: Split column in several columns by delimiter '\' in pandas
body: <p>I have a txt file which I read into pandas dataframe. The problem is that inside this file my text data recorded with delimiter ''. I need to split information in 1 column into several columns but it does not work because of this delimiter.</p>
  <p>I found this post on stackoverflow just with one string, but I don't understand how to apply it once I have a whole dataframe: <a href="https://stackoverflow.com/questions/37484624/split-string-at-delimiter-in-python">Split string at delimiter &#39;\&#39; in python</a></p>
  <p>After reading my txt file into df it looks something like this</p>
  <pre><code>df
  
  column1\tcolumn2\tcolumn3
  
  0.1\t0.2\t0.3
  0.4\t0.5\t0.6
  0.7\t0.8\t0.9
  
  </code></pre>
  <p>Basically what I am doing now is the following:</p>
  <pre><code>df = pd.read_fwf('my_file.txt', skiprows = 8) #I use skip rows because there is irrelevant text
  df['column1\tcolumn2\tcolumn3'] = &quot;r'&quot; + df['column1\tcolumn2\tcolumn3'] +&quot;'&quot; # i try to make it a row string as in the post suggested but it does not really work
  df['column1\tcolumn2\tcolumn3'].str.split('\\',expand=True)
  </code></pre>
  <p>and what I get is just the following (just displayed like text inside a data frame)</p>
  <p>r'0.1\t0.2\t0.3'</p>
  <p>r'0.4\t0.5\t0.6'</p>
  <p>r'0.7\t0.8\t0.9'</p>
  <p>I am not very good with regular expersions and it seems a bit hard, how can I target this problem?</p>