摘要: 正则表达式:r'(^[a-zA-Z]+(?:\s[a-zA-Z]+)+)(?=[\u4e00-\u9fa5])' 替换字符串:‘{\1},,’ 匹配字符串:quite a few相当多 替换结果:{quite a few},,相当多 替换时反向引用要额外增加条反斜杠,对\1进行转义“\1” 以上的内 阅读全文
posted @ 2022-03-10 20:54 易点灵通 阅读(1536) 评论(0) 推荐(0)
摘要: 网址:https://regexr-cn.com/ 正则:(?<=.+[,,;;].+[,,;;]).* 阅读全文
posted @ 2023-02-05 12:07 易点灵通 阅读(129) 评论(0) 推荐(0)
摘要: 生活中我们偶尔会碰到这种情况,当你之前将所有数据已经都整理在一个Excel表格里了,但临时因为需要,却需要将里面的数据分开放在不同的工作表里,该怎么操作呢?利用透视表,我们就能分开这个表格了。 如下图所示,从销售一部到销售七部的所有业绩,全部都在一个表里面,现在我们将表格中数据拆分到7个工作表中,并 阅读全文
posted @ 2022-10-30 11:24 易点灵通 阅读(6561) 评论(0) 推荐(0)
摘要: 设置Classpath的目的,在于告诉Java执行环境,在哪些目录下可以找到您所要执行的Java程序所需要的类或者包。 Java执行环境本身就是一个平台,执行于这个平台上的程序是已编译完成的Java程序(后面会介绍到Java程序编译完成之后,会以.class文件存在)。如果将Java执行环境比喻为操 阅读全文
posted @ 2022-04-26 21:46 易点灵通 阅读(395) 评论(0) 推荐(0)
摘要: import pandas as pd # 读取excel文件,并保存为DataFrame df1 = pd.read_excel(r"C:\Users\admin\Desktop\不规则动词\不规则动词_irregular verbs\Sheet1.xlsx", names=["基本形态", "过 阅读全文
posted @ 2022-04-10 10:57 易点灵通 阅读(346) 评论(0) 推荐(0)
摘要: 我想找到两个相似的字符串。在 示例: from fuzzywuzzy import fuzz string1 = 'Green apple' string2 = 'Apple, green' string3 = 'Green apples - grow on trees' #Test with Fu 阅读全文
posted @ 2022-03-30 20:19 易点灵通 阅读(1712) 评论(0) 推荐(0)
摘要: hashable An object is hashable if it has a hash value which never changes during its lifetime (it needs a __hash__() method), and can be compared to o 阅读全文
posted @ 2022-03-29 22:47 易点灵通 阅读(57) 评论(0) 推荐(0)
摘要: """check whether some letters lies in one word""" word = "paramount" letters = 'para' if letters in word.lower(): print("True") print(letters) print(" 阅读全文
posted @ 2022-03-29 12:14 易点灵通 阅读(1068) 评论(0) 推荐(0)
摘要: from openpyxl import Workbook from openpyxl.reader.excel import load_workbook import os import time import random """ openpyxl(可读写excel表)专门处理Excel2007 阅读全文
posted @ 2022-03-27 21:44 易点灵通 阅读(51) 评论(0) 推荐(0)
摘要: import re s = "1102231990xxxxxxxx" data = re.search('(?P<province>\d{3})(?P<city>\d{3})(?P<born_year>\d{4})', s) dataDict = data.groupdict() print(dat 阅读全文
posted @ 2022-03-27 21:10 易点灵通 阅读(359) 评论(0) 推荐(0)
摘要: 1. 把列表list转换为字典dictionary a = ['1', '2', '3'] b = ['a', 'b', 'c'] c = dict(map(lambda x, y : [x, y], a, b)) print(c) #输出结果: {'1': 'a', '2': 'b', '3': 阅读全文
posted @ 2022-03-23 23:34 易点灵通 阅读(762) 评论(0) 推荐(0)