【发布时间】:2017-09-04 05:43:17
【问题描述】:
我有一个列表,其中包含从在线网站上抓取的数据。列表是这样的
list1 = ['\nJob Description\n\nDESCRIPTION: Interacts with users and technical team members to analyze requirements and develop
technical design specifications. Troubleshoot complex issues and make recommendations to improve efficiency and accurac
y. Interpret complex data, analyze results using statistical techniques and provide ongoing reports. Identify, analyze,
and interpret trends or patterns in complex data sets. Filter and "clean data, review reports, and performance indicator
s to locate and correct code problems. Work closely with management to prioritize business and information needs. Locate
and define new process improvement opportunities. Employ excellent interpersonal and verbal communication skills necess
ary to effectively coordinate interrelated activities with coworkers, end-users, and management. Works autonomously with
minimal supervision. Provides technical guidance and mentoring to other team members. Multi tasks and balances multiple
assignments and priorities. Provides timely status updates.\nQUALIFICATIONS: Proven 5 years working experience as a dat
a analyst Technical expertise regarding data models, database design development, data mining and segmentation technique
s Knowledge of and experience with reporting packages (preferably Microsoft BI Stack), databases (SQL, DB2 etc.), and qu
ery language (SQL) Knowledge of statistics and experience using statistical packages for analyzing large datasets Strong
analytical skills with the ability to collect, organize, analyze, and disseminate significant amounts of information wi
th attention to detail and accuracy Adept at queries, report writing and presenting findings\nNTT DATA is a leading IT s.............]
如何删除“\n”
请记住,在抓取时必须在循环中完成,以便抓取数据,“\n”并删除不需要的空格并将数据推送到 csv 中。
【问题讨论】:
-
如果你有notepad++,你可以查找和替换
-
需要在Python中完成
-
我很确定 python 有一个 replace() 方法。如果是这样,它将类似于 list.replaceAll("\\n", "");
-
@Serge - 我也为此添加了原件。如果您希望我添加更多内容,请告诉我。
标签: python python-3.x web-scraping beautifulsoup