摘要: import pandas as pdimport matplotlib.pyplot as pltimport numpy as np data1=pd.read_excel('./资料1/meal_order_detail.xlsx',sheet_name='meal_order_detail1 阅读全文
posted @ 2023-04-13 09:35 xxxxpig 阅读(167) 评论(0) 推荐(0)
摘要: # -*- coding: utf-8 -*- # 代码12-1 评论去重的代码 import pandas as pdimport reimport jieba.posseg as psgimport numpy as np # 去重,去除完全重复的数据reviews = pd.read_csv( 阅读全文
posted @ 2023-04-03 15:56 xxxxpig 阅读(33) 评论(0) 推荐(0)
摘要: import osimport pandas as pd # 修改工作路径到指定文件夹os.chdir("E:/demo") # # 第一种连接方式# from sqlalchemy import create_engine # engine = create_engine('mysql+pymys 阅读全文
posted @ 2023-03-29 14:31 xxxxpig 阅读(31) 评论(0) 推荐(0)
摘要: import pandas as pdimport matplotlib.pyplot as pltinputfile=r"C:\Users\admin\Documents\WeChat Files\wxid_b0fz4hqogenr22\FileStorage\File\2023-03\origi 阅读全文
posted @ 2023-03-20 15:44 xxxxpig 阅读(64) 评论(0) 推荐(0)
摘要: # 代码8-1 查看数据特征 import numpy as npimport pandas as pd inputfile = r"C:\Users\admin\Documents\WeChat Files\wxid_b0fz4hqogenr22\FileStorage\File\2023-03\ 阅读全文
posted @ 2023-03-15 14:25 xxxxpig 阅读(14) 评论(0) 推荐(0)
摘要: kmeans: import numpy as npimport random import matplotlib.pyplot as plt def distance(point1, point2): # 计算距离(欧几里得距离) return np.sqrt(np.sum((point1 - p 阅读全文
posted @ 2023-03-08 10:25 xxxxpig 阅读(67) 评论(0) 推荐(0)
摘要: 用电预测: import pandas as pdimport matplotlib.pyplot as plt df_normal =pd.read_csv("C:/Users/admin/Documents/WeChat Files/wxid_b0fz4hqogenr22/FileStorage 阅读全文
posted @ 2023-03-01 13:48 xxxxpig 阅读(86) 评论(0) 推荐(0)
摘要: 饼图: import pandas as pdimport matplotlib.pyplot as pltcatering_dish_profit="D:\大三下\数据分析\data\catering_dish_profit.xls"data=pd.read_excel(catering_dish 阅读全文
posted @ 2023-02-25 10:45 xxxxpig 阅读(23) 评论(0) 推荐(0)
摘要: pytorch import torchimport torch.nn as nnimport torch.nn.functional as F class Net(nn.Module): def __init__(self): super(Net, self).__init__() # 1 inp 阅读全文
posted @ 2022-05-15 18:45 xxxxpig 阅读(178) 评论(0) 推荐(0)
摘要: 笔记: 图的定义和图的运行完全分开:在tensorflow中,需要预先定义各种变量,建立相关的数据流图,在数据流图中创建各种变量之间的计算关系,完成图的定义,需要把运算的输入数据放进去后,才会形成输出值。 Tensor张量,是tensorflow中最主要的数据结构,张量用于在计算图中进行数据传递,创 阅读全文
posted @ 2022-04-24 18:08 xxxxpig 阅读(137) 评论(0) 推荐(0)