自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(12)
  • 收藏
  • 关注

原创 pandas操作excel

pandas操作excel

2021-12-16 08:57:58 182

原创 2021-10-14

@echo offcd E:cd E:\DeleteCsvstart python stepId_17.py D:\DTG_CSV_Data 2 *.csv nullexit#! /usr/bin/env python# -*- coding: utf-8 -*-import osimport sysfrom shutil import rmtreeimport datetimeimport timedef walk(path,day,deltype,ignotype

2021-10-14 09:58:06 113

原创 python 连接sql server

import pymssqlimport os,re,sysdef Conn(host,user,password,database): # 服务器名,账户,密码,数据库名 connect = pymssql.connect(host, user, password, database, charset='utf8') if connect: # print("数据库连接成功!") pass cursor = connect.curs.

2021-10-10 09:30:19 207

原创 python发送邮箱

import datetime,os,pathlibimport smtplib # smtp服务器from email.mime.text import MIMEText # 邮件文本def haszipfile(targetDir): list1 = [] for file in os.listdir(targetDir): targetFile = os.path.join(targetDir,file) # print(targetFil...

2021-10-09 13:08:47 157

原创 数据库里导出的CSV的 GB2312格式转成UTF-8-SIG 格式

#!/usr/bin/env python# -*- coding:utf-8 -*-import osfrom chardet import detectdef decod(path): fns = [] for root,dir,file in os.walk(path): if dir == []: print(root,dir,file) for f in file: if o...

2021-10-08 08:49:08 482

原创 XPath下载与安装

XPath下载与安装_528963的博客-CSDN博客_xpath下载

2021-10-05 09:09:16 2366

原创 python 日志

import logging # 引入logging模块import os.path,datetime# 定义日志路径,如无则创建,有则跳过。 以当天日期为文件名。if os.path.exists(r'.\log'): passelse: os.makedirs('.\log')today = datetime.datetime.now().date().strftime('%Y%m%d')# 定义日志格式log_name = './log/output-{}.log'...

2021-09-26 22:50:48 76 1

原创 python 房价

from selenium import webdriverimport timefrom numpy import *import pandas as pddriver = webdriver.Chrome(executable_path='C:\Program Files (x86)\Google\Chrome\Application\chromedriver')content_list = []diqu = [1025,1028,1033,1026,1034,1031,1030,103

2021-09-25 22:54:23 73

原创 python selenium 爬取一个网站

from selenium import webdriverimport timeimport pandas as pddriver = webdriver.Chrome()content_list = []def ai(): div_list = driver.find_elements_by_xpath("//*[@id='SearchResultsListings']/div") # print(len(div_list)) i = 0 ii = 1...

2021-09-24 00:14:05 109

原创 python 爬取微博一页数据

from selenium import webdriverimport timeimport pandas as pddriver = webdriver.Chrome(executable_path='C:\Program Files (x86)\Google\Chrome\Application\chromedriver')driver.get("http://weibo.com/login.php")time.sleep(3)driver.find_element_by_xpath('

2021-09-21 00:27:39 280

原创 python 读取excel中的图片url,下载图片

import xlrd,os,re,timefrom xlrd import xldate_as_tupleimport requestsfrom urllib import requestfrom io import BytesIOfrom PIL import Imagedata = xlrd.open_workbook(r'.\郑州洪水暴雨.xlsx')table = data.sheets()[0]# 创建一个空列表,存储Excel的数据tables = []# 将excel

2021-09-21 00:25:48 1551 1

原创 python turtle绘制一只可爱的小海龟

import turtlet = turtle # 给turtle取别名t.pensize(2) # 设置画笔粗细t.hideturtle() # 隐藏 turtlet.colormode(255) # 切换RGB色彩模式t.color((0, 0, 0), "Green") # 设置画笔颜色和填充颜色t.setup(500, 500) # 设置主窗体的大小和位置t.speed(5) # 定义绘图的速度t.penup() # 抬起笔t.goto(0, -100) # 设置...

2021-09-21 00:19:33 1541 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除