上一页 1 ··· 3 4 5 6 7 8 9 下一页
摘要: Python 文件路径 Path 参考文档: pathlib 面向对象的文件系统路径 使用from pathlib import Path 替代 os.path , 已面向对象的方式进行文件路近操作 打印当前的路径 from pathlib import Path print(Path.cwd()) 阅读全文
posted @ 2021-08-01 20:43 Dapenson 阅读(946) 评论(0) 推荐(0) 编辑
摘要: SQL1 查找最晚入职员工的所有信息 描述 有一个员工employees表简况如下: 请你查找employees里最晚入职员工的所有信息,以上例子输出如下: 示例1 输入: drop table if exists `employees` ; CREATE TABLE `employees` ( ` 阅读全文
posted @ 2021-07-03 22:41 Dapenson 阅读(119) 评论(0) 推荐(0) 编辑
摘要: python 虚拟环境 安装虚拟环境包 pip install virtualenv -i https://pypi.tuna.tsinghua.edu.cn/simple/ 激活虚拟环境 cd 到虚拟环境Scripts目录 cd ENV/Scripts/ 激活虚拟环境 activate (ENV) 阅读全文
posted @ 2021-06-27 23:33 Dapenson 阅读(163) 评论(0) 推荐(0) 编辑
摘要: layout: post title: 将tkinter打包生成exe subtitle: date: 2020-05-30 author: Dapenson header-img: img/post-bg-universe.jpg catalog: true tags: - Python - tk 阅读全文
posted @ 2021-06-27 17:29 Dapenson 阅读(412) 评论(0) 推荐(0) 编辑
摘要: 使用JavaScript创建一个正则匹配函数 function 正则匹配某字符(targetCell) { const strIn = targetCell.Value2; const reg = /(187|180)\w*/; var result = strIn.match(reg); if ( 阅读全文
posted @ 2021-06-15 10:57 Dapenson 阅读(1235) 评论(0) 推荐(0) 编辑
摘要: 20 条非常实用的 Python 代码,建议收藏! Dapenson 以下文章来源于Python大数据分析 ,作者朱卫军 Python大数据分析 1、合并两个字典 Python3.5之后,合并字典变得容易起来。我们可以通过**符号解压字典,并将多个字典传入{}中,实现合并。 def Merge(di 阅读全文
posted @ 2021-06-09 20:26 Dapenson 阅读(103) 评论(0) 推荐(0) 编辑
摘要: xls格式批量转xlsx格式 import os import win32com.client as win32 import easygui as eg def save_as_xlsx(fname): excel = win32.DispatchEx('Excel.Application') w 阅读全文
posted @ 2021-03-25 20:36 Dapenson 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 作者 @chengyuming 原文地址:https://chengyuming.cn/views/basis/issue.html 45个有用的JavaScript技巧,窍门和最佳实践 1. 首次为变量赋值时务必使用var关键字 变量没有声明而直接赋值得话,默认会作为一个新的全局变量,要尽量避免使 阅读全文
posted @ 2021-03-14 14:51 Dapenson 阅读(116) 评论(0) 推荐(0) 编辑
摘要: MySQL安装 cnblogs Navicat安装 cnblogs java SDK 安装 csdn [12-IDEA配置JDK版本(2020.2.3版本)](https://blog.csdn.net/zhuzbYR/article/details/109431339) vue cli 安装 阅读全文
posted @ 2021-03-14 14:44 Dapenson 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 自从我用Python编写第一行代码以来,就被它的简单性、出色的可读性和特别流行的一行代码所吸引。 在下面,我将给大家介绍并解释一些Python一行程序。 可能有些你还不知道,但对你未来的Python项目很有用。 交换两个变量 # a = 4 b = 5 a,b = b,a # print(a,b) 阅读全文
posted @ 2021-03-14 14:38 Dapenson 阅读(221) 评论(0) 推荐(0) 编辑
摘要: Navicat安装 软件下载 在官网下载最新的Navicat软件,下载地址 http://navicat.com.cn/navicat-15-highlights/ 下载完成后一路下一步直接安装,安装完成后不要打开 激活软件 (建议断网激活) 激活工具下载地址 https://download.cs 阅读全文
posted @ 2021-02-06 23:10 Dapenson 阅读(711) 评论(0) 推荐(0) 编辑
摘要: 对一个20667行的xlsx文件进行遍历测试 import pandas as pd # 定义一个计算执行时间的函数作装饰器,传入参数为装饰的函数或方法 def print_execute_time(func): from time import time # 定义嵌套函数,用来打印出装饰的函数的执 阅读全文
posted @ 2021-02-03 21:54 Dapenson 阅读(858) 评论(0) 推荐(0) 编辑
摘要: WPS Excel启用正则表达式 新建一个空白表格文件 进入VB编辑器 插入模块 工具-引用-勾选正则表达式 (Microsoft VBScript Regular Express 5.5) 复制代码 Option Explicit Public Function re_sub(sText As S 阅读全文
posted @ 2020-12-25 22:20 Dapenson 阅读(6301) 评论(1) 推荐(2) 编辑
摘要: 常规方法 对指定目录下的指定类型文件进行遍历,可对文件名关键字进行条件筛选 返回值为文件地址的列表 import os # 定义一个函数,函数名字为get_all_excel,需要传入一个目录 def get_all_excel(dir): file_list = [] for root_dir, 阅读全文
posted @ 2020-12-20 18:39 Dapenson 阅读(2834) 评论(0) 推荐(0) 编辑
摘要: 指定位置替换字符 def replace_char(old_string, char, index): ''' 字符串按索引位置替换字符 ''' old_string = str(old_string) # 新的字符串 = 老字符串[:要替换的索引位置] + 替换成的目标字符 + 老字符串[要替换的 阅读全文
posted @ 2020-12-20 18:35 Dapenson 阅读(19385) 评论(0) 推荐(1) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 下一页