title: Why can't I replace a newline in my pandas dataframe?
body: <p>The code below illustrates the trouble I am having reading from an Excel file and removing unnecessary newline characters.  How can I remove the newline character in the second book's title?</p>
  <p><strong>Data from Books.xlsx</strong></p>
  <pre><code>BookID,Title,Author
  1,&quot;I, Robot&quot;,Rob
  2,Robots
  and me,Rob
  3,I made a robot,Rob
  4,Robotics for dummies,Rob
  </code></pre>
  <pre><code># pandas version is 1.2.0
  import pandas
  
  def fromxl():
      master_tracker = &quot;data_in\\books.xlsx&quot;
      
      df = pandas.read_excel(master_tracker, &quot;Sheet1&quot;, header=0)
  
      # doesn't work
      # df.replace('\n', ' ')
  
      # doesn't work
      # for r in df.iterrows():
      #     r[1][1] = r[1][1].replace('\n', ' ')
  
      print(df)
  </code></pre>
  <p><em>Edit</em>
  Just for clarification, here is what I get when I print the dataframe</p>
  <pre><code>   BookID                 Title Author
  0       1              I, Robot    Rob
  1       2        Robots\nand me    Rob
  2       3        I made a robot    Rob
  3       4  Robotics for dummies    Rob
  </code></pre>