title: Replacing part of string in python pandas dataframe
body: <p>I have a similar problem to the one posted here: </p>
  
  <p><a href="https://stackoverflow.com/questions/13682044/pandas-dataframe-remove-unwanted-parts-from-strings-in-a-column">Pandas DataFrame: remove unwanted parts from strings in a column</a></p>
  
  <p>I need to remove newline characters from within a string in a DataFrame. Basically, I've accessed an api using python's json module and that's all ok. Creating the DataFrame works amazingly, too. However, when I want to finally output the end result into a csv, I get a bit stuck, because there are newlines that are creating false 'new rows' in the csv file.</p>
  
  <p>So basically I'm trying to turn this: </p>
  
  <p>'...this is a paragraph.</p>
  
  <p>And this is another paragraph...'</p>
  
  <p>into this:</p>
  
  <p>'...this is a paragraph. And this is another paragraph...'</p>
  
  <p>I don't care about preserving any kind of '\n' or any special symbols for the paragraph break. So it can be stripped right out.</p>
  
  <p>I've tried a few variations:</p>
  
  <pre><code>misc['product_desc'] = misc['product_desc'].strip('\n')
  
  AttributeError: 'Series' object has no attribute 'strip'
  </code></pre>
  
  <p>here's another</p>
  
  <pre><code>misc['product_desc'] = misc['product_desc'].str.strip('\n')
  
  TypeError: wrapper() takes exactly 1 argument (2 given)
  
  misc['product_desc'] = misc['product_desc'].map(lambda x: x.strip('\n'))
  misc['product_desc'] = misc['product_desc'].map(lambda x: x.strip('\n\t'))
  </code></pre>
  
  <p>There is no error message, but the newline characters don't go away, either. Same thing with this:</p>
  
  <pre><code>misc = misc.replace('\n', '')
  </code></pre>
  
  <p>The write to csv line is this:</p>
  
  <pre><code>misc_id.to_csv('C:\Users\jlalonde\Desktop\misc_w_id.csv', sep=' ', na_rep='', index=False, encoding='utf-8')
  </code></pre>
  
  <p>Version of Pandas is 0.9.1</p>
  
  <p>Thanks! :)</p>