摘要: import pandas as pd from sqlalchemy import create_engine engine = create_engine('mysql+pymysql://root:102011@localhost/test?charset=utf8') sql = pd.re 阅读全文
posted @ 2023-05-07 10:10 白-white 阅读(14) 评论(0) 推荐(0)
摘要: import pandas as pd import matplotlib.pyplot as plt datafile =r"C:\Users\Minori\Desktop\python实训\original_data.xls" # 输入的数据文件 data = pd.read_excel(dat 阅读全文
posted @ 2023-05-07 10:09 白-white 阅读(19) 评论(0) 推荐(0)
摘要: #8-1 import numpy as np import pandas as pd inputfile="D:\数据分析\GoodsOrder.csv" data=pd.read_csv(inputfile,encoding = 'gbk') data.info() data=data['id' 阅读全文
posted @ 2023-05-07 10:08 白-white 阅读(24) 评论(0) 推荐(0)
摘要: import pandas as pd datafile=r'D:\python学习\data\data.csv' resultfile=r'D:\python学习\data\explore.csv' data=pd.read_csv(datafile, encoding='utf-8') expl 阅读全文
posted @ 2023-05-07 10:07 白-white 阅读(6) 评论(0) 推荐(0)
摘要: import pandas as pd # 餐饮数据 data = pd.read_excel(r"C:\Users\Minori\Desktop\python实训\catering_sale.xls",index_col=u'日期') # 读取数据,指定“日期”列为索引列 print(data) 阅读全文
posted @ 2023-05-07 10:04 白-white 阅读(21) 评论(0) 推荐(0)
摘要: import pandas as pd import numpy as np catering_sale='D:\大三下\大数据实验课\data\catering_sale.xls' data=pd.read_excel(catering_sale,names=['data','sale']) bi 阅读全文
posted @ 2023-02-27 12:46 白-white 阅读(13) 评论(0) 推荐(0)
摘要: # 安装 TensorFlow import tensorflow as tf #载入并准备好 MNIST 数据集。将样本从整数转换为浮点数: mnist = tf.keras.datasets.mnist (x_train, y_train), (x_test, y_test) = mnist.l 阅读全文
posted @ 2022-04-25 16:16 白-white 阅读(144) 评论(0) 推荐(0)
摘要: #@author: Mint 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 ]x 阅读全文
posted @ 2022-03-19 21:28 白-white 阅读(55) 评论(0) 推荐(0)
摘要: import math def distance(a,b,c): d = math.sqrt(a*a + b*b + c*c) return d x,y,z=input().split(",") d=distance(float(x),float(y),float(z)) print("{:.2f} 阅读全文
posted @ 2021-10-01 01:45 白-white 阅读(188) 评论(0) 推荐(0)
摘要: func:if n!=0 then func(n-1, a, c, b) move a[n] to c func(n-1, b, a, c) endif 阅读全文
posted @ 2021-10-01 01:43 白-white 阅读(71) 评论(0) 推荐(0)