python非官方package

2017-08-10  本文已影响0人  maocy

Feature Selection 相关:一个计算WOE和Information Value的python工具
https://zhuanlan.zhihu.com/p/20603744?columnSlug=patrickyu

python MySQLdb在windows环境下的快速安装、问题解决方式
http://www.codegood.com/downloads

#linux装anaconda
1、 到官网[http://continuum.io/downloads](http://continuum.io/downloads)下载anaconda。
2、 安装anaconda,在终端输入:cd ~/Downloads;bash Anaconda-2.2.0-[Linux](http://lib.csdn.net/base/linux)-x86_64.sh 
3、 最后会询问是否把anaconda的bin添加到用户的环境变量中,选择yes: /
4. 如果上一步没有选择,则需要手动修改环境变量。方法如下:
终端执行:sudo vi ~/.bashrc
在bashrc文件的最后添加:export PATH="/home/***/anaconda2/bin:$PATH"。(vi编辑器中按i进入编辑模式)
添加完按esc退出编辑模式,并按:x(保存并退出)
5.最后需要更新.bashrc:
source ~/.bashrc
6.1Run Navigator
anaconda-navigator
6.2Run Spyder IDE
spyder
6.3Run Jupyter Notebook
jupyter-notebook
rpy2
#http://www.jianshu.com/p/0849c8f402c6
#最优解决方案  以管理员身份运行
conda install -c r rpy2
%%R   使用
https://github.com/lgautier/jpd-pdapr-slides/blob/gh-pages/notebooks/potholes.ipynb
#ggplot
https://bitbucket.org/rpy2/rpy2/issues/137/error-in-loadnamespace-name-there-is-http://rpy.sourceforge.net/rpy2/doc-2.4/html/rinterface.html


#法2  在window下有rpy2版本可能有问题
1 Downloaded rpy2-2.7.5-cp27-none-win_amd64.whl
 from [http://www.lfd.uci.edu/~gohlke/pythonlibs/#rpy2](http://www.lfd.uci.edu/~gohlke/pythonlibs/#rpy2) as suggested above.
2 cd mwise@MWISE-OPTO ~/Downloads
$ pip install rpy2-2.7.5-cp27-none-win_amd64.whl
#pyper
http://blog.sina.com.cn/s/blog_a28fc28a01016x3l.html
import pyper as pr
r = pr.R(use_pandas = True)
r('library(ggplot2)')

import numpy as np
import pandas as pd
from pandas import Sereis, DataFrame

data = pd.DataFrame(np.arange(16).reshape(4,4),index=list('abcd'),columns=list('wxyz'))
data.iloc[:,0]=('A','B','C','D')
data=data.iloc[:,0:2]
data
r.assign("rdata", data)
print r("summary(rdata)")


r("png('C:/Users/maojh/Documents/jm/testpyr.png')")
r("ggplot(data=rdata,aes(x = w, y = x))+ geom_bar( stat= 'identity')")
r('dev.off()')

http://www.dengfeilong.com/python/274.html
https://www.jstatsoft.org/index.php/jss/article/view/v035c02/v35c02.pdf
上一篇下一篇

猜你喜欢

热点阅读