程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

python_ data_ analysis_ and_ mining_ action-master-4

編輯:Python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#pylint: disable=W1401
"""
Created on Thu Nov 9 15:12:30 2017
@author: lu
"""
import jieba
import pandas as pd
from gensim import corpora, models
"""
Because the data files of each stage have dependencies , So the output here is saved in data/ Under the table of contents
programmer_1--> Extract the data
programmer_2--> Data De duplication
programmer_3--> Use regularization to remove some data
programmer_4--> Use jieba participle
programmer_5--> Semantic analysis after word segmentation ,LDA Model analysis of positive and negative emotions
"""
def programmer_1():
inputfile = "data/huizong.csv"
outputfile = "data/meidi_jd.txt"
data = pd.read_csv(inputfile, encoding="utf-8")
data = data[[u" Comment on "]][data[u" brand "] == u" beauty "]
data.to_csv(outputfile, index=False, header=False, encoding="utf8")
def programmer_2():
inputfile = "data/meidi_jd.txt"
outputfile = "data/meidi_jd_process_1.txt"
data = pd

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved