04 2023 档案

摘要:# 代码12-1 评论去重的代码 import pandas as pd import re import jieba.posseg as psg import numpy as np # 去重,去除完全重复的数据 reviews = pd.read_csv(r"G:\data\data\revie 阅读全文
posted @ 2023-04-28 22:40 doublemiracle 阅读(44) 评论(0) 推荐(0) 编辑
摘要:import os import pandas as pd import pymysql as pm os.chdir("G:\data\data") con = pm.connect(host='localhost',user='root',password='123456',database=' 阅读全文
posted @ 2023-04-28 22:33 doublemiracle 阅读(10) 评论(0) 推荐(0) 编辑
摘要:import pandas as pd import numpy as np data = pd.read_excel(r'G:\data\data\original_data.xls') print('初始状态的数据形状为:', data.shape) # 删除热水器编号、有无水流、节能模式属性 阅读全文
posted @ 2023-04-28 22:30 doublemiracle 阅读(16) 评论(0) 推荐(0) 编辑
摘要:import pandas as pd datafile=r'G:\data\data\air_data.csv' resultfile=r'G:\data\data\explore.csv' data=pd.read_csv(datafile, encoding='utf-8') explore= 阅读全文
posted @ 2023-04-21 00:31 doublemiracle 阅读(13) 评论(0) 推荐(0) 编辑