摘要:
format() 1.通过位置来填充字符串 print('hello {0} i am {1}'.format('world','python')) # 输入结果:hello world i am python print('hello {} i am {}'.format('world','pyt 阅读全文
posted @ 2022-04-28 19:50
牛奶加布丁
阅读(237)
评论(0)
推荐(0)
摘要:
assert(断言) assert(断言)用于判断一个表达式,在表达式条件为 false 的时候触发异常。 assert expression import sys assert ('linux' in sys.platform), "该代码只能在 Linux 下执行" import sys pri 阅读全文
posted @ 2022-04-28 15:29
牛奶加布丁
阅读(63)
评论(0)
推荐(0)
摘要:
各空值类型 df=pd.DataFrame() df['a']=pd.NaT # datetime64[ns] # pandas中pd.NaT表示 not a time。 df['b']=np.nan # float64 # NaN是numpy\pandas下的,不是Python原生的,Not a 阅读全文
posted @ 2022-04-28 12:07
牛奶加布丁
阅读(4892)
评论(0)
推荐(0)

浙公网安备 33010602011771号