02 2021 档案

摘要:方法1、concat()函数 1 select code, name, 2 case 3 when length(code)=6 then concat(code,'000000') 4 when length(code)=9 then concat(code,'000') 5 else code 阅读全文
posted @ 2021-02-23 23:33 绮楼听风雨 阅读(2643) 评论(0) 推荐(0)
摘要:1、三者均支持判断unicode数字和全角数字(双字节),结果均为True 1 str1 = "1" # unicode 2 print(str1.isdigit()) # ==> True 3 print(str1.isdecimal()) # ==> True 4 print(str1.isnu 阅读全文
posted @ 2021-02-21 16:44 绮楼听风雨 阅读(1086) 评论(0) 推荐(0)
摘要:1、round()函数四舍五入 1 print(round(10.4)) # ==>10 2 print(round(10.49)) # ==>10 3 print(round(10.5)) # ==>10 4 print(round(10.51)) # ==>11 5 print(round(10 阅读全文
posted @ 2021-02-20 18:44 绮楼听风雨 阅读(1560) 评论(1) 推荐(0)
摘要:1 #元素为元组的列表 2 dict1 = dict([('a',1),('b',2),('c',3)]) 3 print(dict1) 4 5 #元素为元组的集合 6 dict2 = dict({('a',1),('b',2),('c',3)}) 7 print(dict2) 8 9 #元素为元组 阅读全文
posted @ 2021-02-19 17:14 绮楼听风雨 阅读(514) 评论(0) 推荐(0)
摘要:环境:windows7_64位,python3.8.5,pycharm 描述:使用cmd和Pycharm安装geopandas均报错,提示需要安装fiona,安装fiona又出错。。。折腾了半天,百度出了原因 原因:geopandas有3个依赖包:shapely、gdal、fiona,而fiona又 阅读全文
posted @ 2021-02-16 23:06 绮楼听风雨 阅读(4379) 评论(0) 推荐(0)
摘要:字符串相似度应用场景:拼写纠错、文本去重、上下文相似性、不同来源数据对比等。评价字符串相似度最常见的办法就是:把一个字符串通过插入、删除或替换这样的编辑操作,变成另外一个字符串,所需要的最少编辑次数,这种就是编辑距离(edit distance)度量方法,也称为Levenshtein距离。 方法1、 阅读全文
posted @ 2021-02-04 22:23 绮楼听风雨 阅读(5484) 评论(0) 推荐(0)