![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python Learning
Gary_Moon
软件工程师进阶之路
展开
-
LOC和ILOC以及XI的区别
loc——通过行标签索引行数据 1.1 loc[1]表示索引的是第1行(index 是整数)[python] view plain copyprint? import pandas as pd data = [[1,2,3],[4,5,6]] index = [0,1] columns=[‘a’,’b’,’c’] df = pd.DataFrame(data=data, index=in转载 2017-07-20 09:45:57 · 852 阅读 · 0 评论 -
python中 %总结
%s 字符串[python] view plain copystring="hello" #%s打印时结果是hello print "string=%s" % string # output: string=hello #%2s意思是字符串长度为2,当原字符串的长度超过2时,按原长度打印转载 2017-11-12 23:32:24 · 514 阅读 · 0 评论