forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
Tips & Tricks
Phillip Cloud edited this page Jul 31, 2013
·
7 revisions
In [1]: from distutils.version import LooseVersion
In [2]: LooseVersion(np.__version__)>='1.7.0'
Out[2]: True
import nose
try:
import a_module
except ImportError:
raise nose.SkipTest
git remote add upstream git://github.com/pydata/pandas
git fetch upstream
git fetch upstream
git rebase upstream/master
git fetch upstream
git rebase --interactive upstream/master
This tip allows you to rebase relative to upstream/master
which allows you to do squash commits from the point at which your fork diverged from pandas upstream
git config --list --global
git config --global core.filemode false
git config --global core.autocrlf input
nosetests -Isome_test_name
nosetests -x
# stores ids
nosetests --with-ids
# runs only tests that previously failed
nosetests --failed
from pandas.io.common import urlopen
with urlopen('http://www.google.com') as url:
raw_text = url.read()
from pandas.io.common import ZipFile
with ZipFile('file.zip') as zf:
raw_text = zf.read('file.txt')