摘要: 报错结果:bash-3.2# brew updateError: Cowardly refusing to `sudo brew update`解决方案:顺序执行以下即可:ls -al `which brew`sudo chown root:wheel `which brew`sudo chown ... 阅读全文
posted @ 2015-11-06 14:02 鸟海无涯 阅读(748) 评论(0) 推荐(0) 编辑
摘要: pandas 引入约定:1 from pandas import Series, DataFrame2 import pandas as pdpandas 数据结构【1】Series Series 类似一维数组对象,它由一组数据以及一组索引组成,可以通过 Series 的 values 和 ind... 阅读全文
posted @ 2015-10-29 14:33 鸟海无涯 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 跟着官网快捷安装,出现以下报错信息:huanghonglindeMacBook-Pro:local huanghonglin$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/instal... 阅读全文
posted @ 2015-10-26 16:09 鸟海无涯 阅读(1967) 评论(0) 推荐(0) 编辑
摘要: 默认参数def ask_ok(prompt, retries=4, complaint='Yes or no, please!'): while True: ok = raw_input(prompt) if ok in ('y', 'ye', 'yes'): ... 阅读全文
posted @ 2015-10-16 15:16 鸟海无涯 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 读取操作import xlrd打开 Excel 文件excel = xlrd.open_workbook('excel.xls')查看 sheet 名excel.sheet_names()得到第一个工作表,或者通过索引顺序,或工作表名称table = excel.sheets()[0]table =... 阅读全文
posted @ 2015-09-22 14:13 鸟海无涯 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 在MovieLens 1M数据集其中一个例子,使用pivot_table()按性别计算每部电影的平均得分1 mean_ratings = data.pivot_table('rating', rows='title', cols='gender', aggfunc='mean')2 print me... 阅读全文
posted @ 2015-09-14 16:25 鸟海无涯 阅读(3516) 评论(0) 推荐(0) 编辑