摘要: """使用情况:等值转换,范围转换,列转行操作方式:两种1:将case后的字段值与when后面的值进行比较,简单分类 select 字段1, 字段2, case 字段3 when 值1 then 新值 when 值2 then 新值 end as 重新命名字段3的名字 from table wher 阅读全文
posted @ 2021-07-22 14:24 ttoia 阅读(137) 评论(0) 推荐(0) 编辑
摘要: collections defaultdict 对于一个字典或键值,取不存在的键时返回函数提前设置好的默认值。避免取键错误。 1 import collections 2 3 4 def default_factory(): 5 return 'default value' 6 # ss = {'f 阅读全文
posted @ 2021-07-22 10:45 ttoia 阅读(39) 评论(0) 推荐(0) 编辑