- 博客(4)
- 收藏
- 关注
转载 正则表达式
关于正则表达式一直都是个让很多程序员都觉得很郁闷的一个东西,我觉得创造正则表达式的那个家伙简直就是个奇葩,要不就是火星人。就那么一个字符规则校验就足以使那么多程序员为之抓狂,你可以想象这个东西该有多变态。这篇文章,我写了四个小时,就在快要写完的时候,因为要参考其他的文献资料,不小心按到了回退键,可怕的是我还没有保存,我很抓狂,真的很抓狂,甚至有点小失控。好吧,我不淡定了,既然是这样,那这个东西我是必然要写出来的。.匹配除换行符以外的任意字符\w匹配字母或数字或下划线或汉字\s匹配任意的空白符。...
2022-07-19 10:57:11
776
原创 Notes of Pandas[1]:Indexing and selecting
Indexing:行:.loc[ ‘a’ ] : ‘a’为index名,也可以是数字。 # by label.iloc[5] : 只能是数字,表示第几行。 # by position列:df['A']df [['A', 'B']] # 注意index多行 传入列表df.A # df.C 用于赋值,C不能是新增列, 新增列只能用df['C']This will not modify df because the column alignment is befor...
2022-04-26 10:45:07
84
转载 matplotlib基础1:绘图基本属性设置 -- xticks(loc,labels)格式化转义标记
<div class="blog-content-box"> <div class="article-header-box"> <div class="article-header"> <div class="article-title-box"> <h1 class="title-article">matplotlib基础1:绘图基本属性设置 -- xticks(...
2020-07-12 10:38:12
2091
原创 python property的用法
set 和 get class attributes…property(fget=None, fset=None, fdel=None, doc=None)class Celsius: def __init__(self, temperature = 0): self._temperature = temperature def to_fahrenheit(...
2020-02-13 04:48:45
171
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人