摘要: df3.fillna(0, inplace=True) 阅读全文
posted @ 2024-02-07 14:37 爱学习的小猫咪 阅读(11) 评论(0) 推荐(0) 编辑
摘要: print(df2) test_data = pd.pivot(data=df2 # 待转换df , index=['main_customer_code1','product_code1'] # df交叉后行 , columns='data_date1' # df交叉后的列 , values='t 阅读全文
posted @ 2024-02-07 10:53 爱学习的小猫咪 阅读(2) 评论(0) 推荐(0) 编辑
摘要: import requests import csv import time class price_spider(object): def __init__(self): self.headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; W 阅读全文
posted @ 2023-07-06 23:20 爱学习的小猫咪 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 商品名称 日期 价格 商品A 2022/1/3 150 商品A 2022/1/4 200 商品A 2022/1/1 100 商品B 2022/1/2 180 商品B 2022/1/1 120 1. 首先,你需要有一个包含商品名称、采购日期和采购价格的表格。例如,A列是商品名称,B列是采购日期,C列是 阅读全文
posted @ 2023-07-04 03:39 爱学习的小猫咪 阅读(126) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd from openpyxl.utils import get_column_letter, column_index_from_string import openpyxl wb = openpyxl.load_workbook('cases.xlsx') s 阅读全文
posted @ 2022-08-12 10:18 爱学习的小猫咪 阅读(22) 评论(0) 推荐(0) 编辑
摘要: import pandas as pd from sqlalchemy import create_engine path="C:\\Users\\Administrator\\Desktop\指标\\" data=pd.DataFrame() flile=os.listdir(path) list 阅读全文
posted @ 2022-07-27 10:27 爱学习的小猫咪 阅读(46) 评论(0) 推荐(0) 编辑
摘要: 1,顿号 插入数据 insert into order_table VALUES(1,001,100,'2018-01-01 00:00:00'); insert into order_table VALUES(2,001,300,'2018-01-02 00:00:00'); insert int 阅读全文
posted @ 2022-05-15 16:52 爱学习的小猫咪 阅读(51) 评论(0) 推荐(0) 编辑
摘要: 原始数据 处理结果展示 DDL CREATE TABLE `company` ( `id` int(20) DEFAULT NULL, `name` varchar(100) DEFAULT NULL, `shareholder` varchar(100) DEFAULT NULL ) ENGINE 阅读全文
posted @ 2021-04-06 14:01 爱学习的小猫咪 阅读(923) 评论(1) 推荐(1) 编辑
摘要: 变换成如下格式 import pandas as pd from win32com.client import Dispatch import openpyxl import xlsxwriter workbook=xlsxwriter.Workbook('you.xlsx') worksheet= 阅读全文
posted @ 2021-03-31 15:50 爱学习的小猫咪 阅读(1369) 评论(0) 推荐(0) 编辑