使用scrapy框架爬取了一些汽车评价保存在csv文件中,但是直接打开时乱码了。
使用pandas读取再使用to_csv()方法重新保存import pandas as pd
file_name = 'G:/myLearning/pythonML201804/spiderLearning/scrapy_learning/car_comment_crawler/\
car_comment_crawler/spiders/haval_all_page3.csv'
file_name2 = 'G:/myLearning/pythonML201804/spiderLearning/scrapy_learning/car_comment_crawler/\
car_comment_crawler/spiders/haval_all_page4.csv'
file_name3 = 'G:/myLearning/pythonML201804/spiderLearning/scrapy_learning/car_comment_crawler/\
car_comment_crawler/spiders/haval_all_page5.csv'
df = pd.read_csv(file_name, encoding='utf-8')
df