上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 17 下一页
摘要: CSV dat = pd.read_csv('temp.csv', header=0, names=['a','b','c'], sep='\t') dat.to_csv('temp.csv', index=False, header=False) HTML dat = pd.read_html(' 阅读全文
posted @ 2018-07-27 11:45 jhc888007 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 初始化Series srs = pd.Series([1,2,3,4]) srs = pd.Series([1,2,3,4], index=['a','b','c','d']) srs1 = pd.Series(srs2) 布尔Series srs>1:值是否大于1 srs.isin([2,3,4] 阅读全文
posted @ 2018-07-27 11:27 jhc888007 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 初始化数组 arr = np.array([[1,2],[3,4]]) arr = np.array([[1,2],[3,4]], dtype=complex) arr = np.zeros((3,4)) arr = np.ones((1,2)) arr = np.arange(4,10).resh 阅读全文
posted @ 2018-07-26 16:21 jhc888007 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 函数式编程: map((lambda x: x+1), lst) filter((lambda x: x in dic), lst) reduce((lambda x, y: x*10 + y, lst) [x for x in dic] 阅读全文
posted @ 2018-07-26 15:11 jhc888007 阅读(160) 评论(0) 推荐(0) 编辑
摘要: 此篇文章很赞: https://www.cnblogs.com/lzxwalex/p/6880748.html 阅读全文
posted @ 2018-07-23 14:47 jhc888007 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 测试代码: Python2.6.6: 0.9-1.4msPython3.4.2: 6.7-7.5msPython3.6.3: 5.8-6.5msPython3.6.6: 5.5-6.5ms差异明显 阅读全文
posted @ 2018-07-16 19:52 jhc888007 阅读(233) 评论(0) 推荐(0) 编辑
摘要: yum -y install python-devel wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz tar -xvJf Python-3.6.2.tar.xz cd Python-3.6.2 ./configure 阅读全文
posted @ 2018-07-11 09:56 jhc888007 阅读(112) 评论(0) 推荐(0) 编辑
摘要: cp /usr/local/python3/lib/python3.4/configparser.py /usr/local/python3/lib/python3.4/ConfigParser.py 参考文献:https://blog.csdn.net/kk185800961/article/de 阅读全文
posted @ 2018-07-09 15:21 jhc888007 阅读(151) 评论(0) 推荐(0) 编辑
摘要: x = {1: 2, 3: 4, 4: 3, 2: 1, 0: 0} sorted = sorted(x.iteritems(), key=lambda x: x[1], reverse=True) import operator;sorted = sorted(x.iteritems(), key 阅读全文
posted @ 2018-06-20 11:17 jhc888007 阅读(187) 评论(0) 推荐(0) 编辑
摘要: Dict到Series: series = pandas.Series(dic) Series到DataFrame(一维): data = pandas.DataFrame(series, columns = ['content']) Series到DataFrame(二维): data = pan 阅读全文
posted @ 2018-05-30 16:10 jhc888007 阅读(428) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 17 下一页