I have this dataframe parsed from a web page using web-scraping. Libraries used are, bs4(BeautifulSoup), pandas, requests and urllib. The table has to be downloaded in csv for data visualisation in tableau afterwards. So without affecting any of the rows and columns, I want to remove "\n" from the dataframe. Any help will be appreciatenter image description hereed.
            Asked
            
        
        
            Active
            
        
            Viewed 458 times
        
    2 Answers
0
            I think your question is answered within this question.
More precisely,
dataFrame.replace('\n', '', regex=True)
should do it for you. Please note that after this, you may also need to strip the strings from leading and trailing whitespaces, and also to convert some of the columns (seemingly Pos should be an integer), with the astype method.
 
    
    
        borosdenes
        
- 73
- 7
- 
                    thanks pal. striping did solve the issue for me. Really appreciate your help. – bufferflowover Aug 31 '20 at 11:03

 
     
    