pandas 入门

建立环境 安装 pandas sudo apt-get install build-essential python-dev sudo apt-get install python-pandas python-tk sudo apt-get install python-scipy python-matplotlib python-tables sudo apt-get install python-numexpr python-xlrd python-statsmodels sudo apt-get install python-openpyxl python-xlwt python-bs4 安装 ipython-notebook sudo pip install "ipython[notebook]" sudo pip install pygments 运行 ipython-notebook ipython notebook #如果你使用matplotlib内嵌进网页中,那么需要运行: ipython notebook --matplotlib inline 导入 pandas import pandas as pd import numpy as np 读入数据 # 读入 CSV 格式数据 # 数据来源:http://boxofficemojo.com/daily/ df_movies = pd.read_csv('movies.csv', sep='\t', encoding='utf-8') df_movies....

February 7, 2015 · 3 min · Me

Install wordpress on LinuxMint(Ubuntu)

install softwares: sudo apt-get install wordpress mysql-server phpmyadmin make links: sudo ln -s /usr/share/wordpress/ /var/www/wp sudo ln -s /usr/share/phpmyadmin/ /var/www/phpmyadmin restart services: sudo service apache2 restart sudo service mysql restart 在phpmyadmin中创建wordpress专用用户 config wordpress: cd /usr/share/wordpress mv wp-config.php wp-config.php.bak 修改wp-config-sample.php 中的用户名和密码,另存为wp-config.php add administrator open http://127.0.0.1/wp/ ,set user name and password of wordpress’s admin.

October 26, 2014 · 1 min · Me

Linux 下压缩和解压缩

Linux下压缩文件种类繁多,这里简单介绍一下常用的命令。 常用压缩命令 扩展名 解压 打包 .tar tar xvf FileName.tar tar cvf FileName.tar DirName .tar.gz tar zxvf FileName.tar.gz tar zcvf FileName.tar.gz DirName .tar.bz2 tar jxvf FileName.tar.bz2 tar tar jcvf FileName.tar.bz2 DirName .gz gunzip FileName.gz gzip -d FileName.gz gzip FileName .bz2 bzip2 -d FileName.bz2 bunzip2 FileName.bz2 bzip2 -z FileName .bz bzip2 -d FileName.bz bunzip2 FileName.bz .tar.bz tar jxvf FileName.tar.bz .Z uncompress FileName.Z compress FileName .tar.Z tar Zxvf FileName.tar.Z tar Zcvf FileName.tar.Z DirName ....

October 20, 2014 · 1 min · Me

github.io 丢失下划线开头的文件

近来开始在 github.io 上写 blog ,但是发现 github 不支持下划线开头的目录。 于是写 Email 向 github 求助,很快就得到回复。原来是 Jekyll (亦或是 ruby?) 的 问题。 Jekyll 不支持点号、井号或下划线开头的东东。 解决方法: 在根目录加入一个 .nojekyll 文件,来关闭 Jekyll 。 参考: files-that-start-with-an-underscore-are-missing

October 18, 2014 · 1 min · Me

Linux Mint 17 安装笔记

Install cloudstation Download cloudstation Uncompress ./install Select software source Select the fastest software source Install some software Install following software: sudo apt-get install build-essential python-dev sudo apt-get install fcitx fcitx-ui-classic fcitx-table-wbpy sudo apt-get install git vim-gnome ctags keepassx filezilla Software setup Sync firefox Setup git, see : Github Setup Install virtualenv Install pip and virtualenvwrapper: sudo apt-get install python-pip sudo pip install virtualenvwrapper Add flowing to ~/.bashrc: export WORKON_HOME=$HOME/.virtualenvs export PROJECT_HOME=$HOME/project source /usr/local/bin/virtualenvwrapper....

October 16, 2014 · 1 min · Me