摘要: import wximport sqlite3 #嵌入信息库 #conn = sqlite3.connect('student information')#cursor = conn.cursor()#cursor.execute('insert into user (id,name,sr) val 阅读全文
posted @ 2021-12-12 11:52 Nurtal 阅读(43) 评论(0) 推荐(0)
摘要: # 代码12-1 评论去重的代码 import pandas as pdimport reimport jieba.posseg as psgimport numpy as np # 去重,去除完全重复的数据 reviews = pd.read_csv("D:/JupyterLab-Portable 阅读全文
posted @ 2023-05-05 23:03 Nurtal 阅读(40) 评论(0) 推荐(0)
摘要: import os import pandas as pd # 修改工作路径到指定文件夹 os.chdir("D:/anaconda/python-work/Three/第十一章") # 第二种连接方式 import pymysql as pm con = pm.connect(host='loca 阅读全文
posted @ 2023-04-03 23:16 Nurtal 阅读(44) 评论(0) 推荐(0)
摘要: import pandas as pdimport matplotlib.pyplot as plt inputfile = "C:\\Users\\Lenovo\\Desktop\\original_data.xls" # 输入的数据文件data = pd.read_excel(inputfile 阅读全文
posted @ 2023-03-27 13:21 Nurtal 阅读(31) 评论(0) 推荐(0)
摘要: import numpy as npimport pandas as pdimport matplotlib.pyplot as plt plt.rcParams["font.sans-serif"] = ["SimHei"]plt.rcParams["axes.unicode_minus"] = 阅读全文
posted @ 2023-03-19 22:43 Nurtal 阅读(24) 评论(0) 推荐(0)
摘要: import pandas as pddatafile=r"C:\Users\Lenovo\Desktop\air_data.csv"resultfile=r"D:\explore.csv"data=pd.read_csv(datafile, encoding='utf-8')explore=dat 阅读全文
posted @ 2023-03-13 20:54 Nurtal 阅读(41) 评论(0) 推荐(0)
摘要: import pandas as pdcatering_sale="C:/Users/Lenovo/Desktop/catering_sale.xls" data=pd.read_excel(catering_sale,index_col=u'日期')print(data.describe()) i 阅读全文
posted @ 2023-03-13 20:43 Nurtal 阅读(27) 评论(0) 推荐(0)
摘要: # 预测财政收入,2014、2015(y) 神经网络,用到data_1import osimport numpy as npimport pandas as pdfrom sklearn.linear_model import LassoLarsfrom sklearn.linear_model i 阅读全文
posted @ 2023-03-05 22:35 Nurtal 阅读(23) 评论(0) 推荐(0)
摘要: import pandas as pdcatering_sale="C:/Users/Lenovo/Desktop/catering_sale.xls" data=pd.read_excel(catering_sale,index_col=u'日期')print(data.describe()) i 阅读全文
posted @ 2023-02-27 00:17 Nurtal 阅读(31) 评论(0) 推荐(0)
摘要: import mathimport numpy as npimport pandas as pdfrom pandas import DataFramey =[0.14 ,0.64 ,0.28 ,0.33 ,0.12 ,0.03 ,0.02 ,0.11 ,0.08 ]x1 =[0.29 ,0.50 阅读全文
posted @ 2022-03-19 22:27 Nurtal 阅读(50) 评论(0) 推荐(0)