摘要: 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:26 AllenAndDog 阅读(23) 评论(0) 推荐(0)
摘要: import pandas as pd import matplotlib.pyplot as plt inputfile = "C:\\Users\\Lenovo\\Desktop\\original_data.xls" # 输入的数据文件 data = pd.read_excel(inputfi 阅读全文
posted @ 2023-03-27 15:38 AllenAndDog 阅读(29) 评论(0) 推荐(0)
摘要: import numpy as np import pandas as pd import matplotlib.pyplot as plt plt.rcParams["font.sans-serif"] = ["SimHei"] plt.rcParams["axes.unicode_minus"] 阅读全文
posted @ 2023-03-19 23:03 AllenAndDog 阅读(65) 评论(0) 推荐(0)
摘要: import pandas as pd datafile=r"C:\Users\Lenovo\Desktop\air_data.csv" resultfile=r"D:\explore.csv" data=pd.read_csv(datafile, encoding='utf-8') explore 阅读全文
posted @ 2023-03-13 09:16 AllenAndDog 阅读(44) 评论(0) 推荐(0)
摘要: # 预测财政收入,2014、2015(y) 神经网络,用到data_1 import os import numpy as np import pandas as pd from sklearn.linear_model import LassoLars from sklearn.linear_mo 阅读全文
posted @ 2023-03-05 22:42 AllenAndDog 阅读(26) 评论(0) 推荐(0)
摘要: import pandas as pd catering_sale="C:/Users/Lenovo/Desktop/catering_sale.xls" data=pd.read_excel(catering_sale,index_col=u'日期') print(data.describe()) 阅读全文
posted @ 2023-02-26 23:52 AllenAndDog 阅读(49) 评论(0) 推荐(0)
摘要: 1.Tensorflow入门 # TensorFlow and tf.keras import tensorflow as tf from tensorflow import keras # Helper libraries import numpy as np import matplotlib. 阅读全文
posted @ 2022-05-16 21:31 AllenAndDog 阅读(64) 评论(0) 推荐(0)
摘要: 1.TensorFlow介绍 2.TensorFlow基础知识 备注: 使用图 (graph)来表示计算任务. 在被称之为 会话 (Session) 的上下文 (context) 中执行图. 使用 tensor 表示数据. 通过 变量 (Variable) 维护状态. 使用 feed 和 fetch 阅读全文
posted @ 2022-04-24 21:52 AllenAndDog 阅读(108) 评论(0) 推荐(0)
摘要: 1.numpy import mathimport numpy as npimport pandas as pdfrom pandas import DataFrame,Seriesdef sigmoid(x): #映射函数 return 1/(1+math.exp(-x))x1=[0.29,0.5 阅读全文
posted @ 2022-03-19 21:49 AllenAndDog 阅读(105) 评论(0) 推荐(0)
摘要: 一。mysql import pymysql# 创建表格db = pymysql.connect(host='localhost',user='root',password='13642205874lgw',database='mrsoft')cursor = db.cursor()cursor.e 阅读全文
posted @ 2021-12-12 11:45 AllenAndDog 阅读(188) 评论(0) 推荐(0)