Skip to content

0.20.2 backports 1 #16535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 44 commits into from
May 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
7b41c7f
BUG: incorrect handling of scipy.sparse.dok formats (#16197) (#16191)
keitakurita May 11, 2017
7858082
Unblock supported compression libs in pytables (#16196)
linebp May 11, 2017
e5cf9b6
BUG: Accept list-like color with single col in plot (#16233)
TomAugspurger May 11, 2017
d538851
TST: release testing of downstream packages (#16261)
jreback May 6, 2017
1e146e4
BUG: support for "level=" when reset_index() is called with a single …
toobaz May 6, 2017
38684f3
TST: remove xfailing css tests (#16272)
jreback May 6, 2017
8f231c8
DOC: add whatsnew 0.20.2 to display (#16273)
jreback May 6, 2017
8175581
DOC: change 0.20.1 whatsnew text -> 0.20.2 (#16274)
jreback May 6, 2017
c17a3e9
DOC: fixed broken link GH16279 (#16281)
SimonBaron May 8, 2017
6f9e907
BUG: pathlib.Path in io (#16292)
chris-b1 May 12, 2017
0b77d30
BLD: depending on non-existant file in sparse (#16293)
jreback May 9, 2017
c7e3d61
COMPAT: don't force clipboard routines to be imported in main pandas …
jreback May 9, 2017
1c26a78
PERF: fix clean_index_list perf (#16295)
jreback May 9, 2017
a1ac8d1
BLD: run only multi on 2.7-build_test build (#16296)
jreback May 9, 2017
9e77690
BUG: Don't segfault to_numeric when input is empty (#16305)
gfyoung May 9, 2017
6f3a053
TST: not printing skips (#16318)
jreback May 10, 2017
8d02272
PERF: improved performance of small multiindexes (#16324)
jreback May 11, 2017
3a25bb9
BUG: Preserve data order when stacking unsorted levels (#16323) (#16325)
dsm054 May 11, 2017
2eea690
DOC: Correctly redirect to SetupTools documentations (#16333)
townie May 11, 2017
e1e68b7
BUG: Categorical comparison with unordered (#16339)
TomAugspurger May 18, 2017
c6ce9ea
PERF: improve MultiIndex get_loc performance (#16346)
jorisvandenbossche May 17, 2017
41d90dc
PERF: improved clip performance (#16364)
jreback May 16, 2017
a495669
TST: followup to #16364, catch errstate warnings (#16373)
jreback May 17, 2017
5a68602
TST: remove pandas-datareader xfail as 0.4.0 works (#16374)
jreback May 17, 2017
ace96a3
BUG: reshape fix for maybe_infer_to_datetimelike()
May 24, 2017
772e63f
BUG: wide_to_long should check for unique id vars (#16382) (#16403)
erikcs May 23, 2017
1e3141e
DOC: add google analytics to the documentation (#16412)
jorisvandenbossche May 22, 2017
61503ea
PERF: don't materialize arrays on checking in groupby (#16413)
jreback May 22, 2017
75efd8a
COMPAT: Catch warnings on tab-complete in IPy 6 (#16414)
TomAugspurger May 26, 2017
5f82c41
Error with .drop([]) on non-unique index (#16428)
lkirk May 24, 2017
aded53e
BUG: Interpolate limit=n GH16282 (#16429)
WBare May 23, 2017
e735629
BUG: handle nan values in DataFrame.update when overwrite=False (#155…
pcluo May 24, 2017
c4b53c7
15819 rolling window on empty df (#16431)
chernrick May 25, 2017
07ae2e0
BUG: Silence numpy warnings when broadcasting comparison ops (GH16378…
andrewarcher May 25, 2017
3f20852
BUG: fix isin with Series of tuples values (#16394) (#16434)
jaredsnyder May 23, 2017
1d1ef5d
BUG: Render empty DataFrame as empty HTML table w/o raising IndexErro…
JimStearns206 May 23, 2017
033a892
BUG: Don't ignore figsize in df.boxplot (#16445)
May 24, 2017
01bc872
BUG: Fix warning with c engine when skipping lines with comment (#16455)
pankajp May 24, 2017
c52f647
DOC: update make.py script (#16456)
jorisvandenbossche May 23, 2017
7b0ed01
ENH: Add to_latex() method to Series (#16180) (#16465)
bsweger May 26, 2017
ffe4429
COMPAT: feather-format 0.4.0 compat (#16475)
jreback May 24, 2017
788716f
CLN: Small linting failures (#16491)
TomAugspurger May 25, 2017
baf8b15
TST: ujson tests are not being run (#16499) (#16500)
abarber4gh May 26, 2017
9c4a033
TST: Specify HTML file encoding on PY3 (#16526)
neirbowj May 29, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ after_success:

after_script:
- echo "after_script start"
- source activate pandas && python -c "import pandas; pandas.show_versions();"
- source activate pandas && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
- if [ -e /tmp/single.xml ]; then
ci/print_skipped.py /tmp/single.xml;
fi
Expand Down
9 changes: 9 additions & 0 deletions asv_bench/benchmarks/groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,11 @@ def setup(self):
self.dates = (np.datetime64('now') + self.offsets)
self.df = DataFrame({'key1': np.random.randint(0, 500, size=self.n), 'key2': np.random.randint(0, 100, size=self.n), 'value1': np.random.randn(self.n), 'value2': np.random.randn(self.n), 'value3': np.random.randn(self.n), 'dates': self.dates, })

N = 1000000
self.draws = pd.Series(np.random.randn(N))
labels = pd.Series(['foo', 'bar', 'baz', 'qux'] * (N // 4))
self.cats = labels.astype('category')

def time_groupby_multi_size(self):
self.df.groupby(['key1', 'key2']).size()

Expand All @@ -377,6 +382,10 @@ def time_groupby_dt_size(self):
def time_groupby_dt_timegrouper_size(self):
self.df.groupby(TimeGrouper(key='dates', freq='M')).size()

def time_groupby_size(self):
self.draws.groupby(self.cats).size()



#----------------------------------------------------------------------
# groupby with a variable value for ngroups
Expand Down
35 changes: 31 additions & 4 deletions asv_bench/benchmarks/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ def time_getitem_list_like(self):
def time_getitem_array(self):
self.s[np.arange(10000)]

def time_getitem_lists(self):
self.s[np.arange(10000).tolist()]

def time_iloc_array(self):
self.s.iloc[np.arange(10000)]

Expand Down Expand Up @@ -190,9 +193,15 @@ def setup(self):
np.arange(1000)], names=['one', 'two'])

import string
self.mistring = MultiIndex.from_product(
[np.arange(1000),
np.arange(20), list(string.ascii_letters)],

self.mi_large = MultiIndex.from_product(
[np.arange(1000), np.arange(20), list(string.ascii_letters)],
names=['one', 'two', 'three'])
self.mi_med = MultiIndex.from_product(
[np.arange(1000), np.arange(10), list('A')],
names=['one', 'two', 'three'])
self.mi_small = MultiIndex.from_product(
[np.arange(100), list('A'), list('A')],
names=['one', 'two', 'three'])

def time_series_xs_mi_ix(self):
Expand All @@ -215,8 +224,26 @@ def time_multiindex_get_indexer(self):
(0, 16), (0, 17), (0, 18),
(0, 19)], dtype=object))

def time_multiindex_large_get_loc(self):
self.mi_large.get_loc((999, 19, 'Z'))

def time_multiindex_large_get_loc_warm(self):
for _ in range(1000):
self.mi_large.get_loc((999, 19, 'Z'))

def time_multiindex_med_get_loc(self):
self.mi_med.get_loc((999, 9, 'A'))

def time_multiindex_med_get_loc_warm(self):
for _ in range(1000):
self.mi_med.get_loc((999, 9, 'A'))

def time_multiindex_string_get_loc(self):
self.mistring.get_loc((999, 19, 'Z'))
self.mi_small.get_loc((99, 'A', 'A'))

def time_multiindex_small_get_loc_warm(self):
for _ in range(1000):
self.mi_small.get_loc((99, 'A', 'A'))

def time_is_monotonic(self):
self.miint.is_monotonic
Expand Down
11 changes: 11 additions & 0 deletions asv_bench/benchmarks/series_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ def setup(self):
def time_series_dropna_int64(self):
self.s.dropna()


class series_dropna_datetime(object):
goal_time = 0.2

Expand All @@ -120,3 +121,13 @@ def setup(self):

def time_series_dropna_datetime(self):
self.s.dropna()


class series_clip(object):
goal_time = 0.2

def setup(self):
self.s = pd.Series(np.random.randn(50))

def time_series_dropna_datetime(self):
self.s.clip(0, 1)
27 changes: 16 additions & 11 deletions ci/install_travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,7 @@ if [ "$COVERAGE" ]; then
fi

echo
if [ "$BUILD_TEST" ]; then

# build & install testing
echo ["Starting installation test."]
bash ci/install_release_build.sh
conda uninstall -y cython
time pip install dist/*tar.gz || exit 1

else
if [ -z "$BUILD_TEST" ]; then

# build but don't install
echo "[build em]"
Expand Down Expand Up @@ -163,9 +155,22 @@ fi
# w/o removing anything else
echo
echo "[removing installed pandas]"
conda remove pandas --force
conda remove pandas -y --force

if [ -z "$BUILD_TEST" ]; then
if [ "$BUILD_TEST" ]; then

# remove any installation
pip uninstall -y pandas
conda list pandas
pip list --format columns |grep pandas

# build & install testing
echo ["building release"]
bash scripts/build_dist_for_release.sh
conda uninstall -y cython
time pip install dist/*tar.gz || exit 1

else

# install our pandas
echo
Expand Down
2 changes: 1 addition & 1 deletion ci/requirements-3.5_OSX.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ source activate pandas

echo "install 35_OSX"

conda install -n pandas -c conda-forge feather-format
conda install -n pandas -c conda-forge feather-format==0.3.1
20 changes: 13 additions & 7 deletions ci/script_multi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,26 @@ export PYTHONHASHSEED=$(python -c 'import random; print(random.randint(1, 429496
echo PYTHONHASHSEED=$PYTHONHASHSEED

if [ "$BUILD_TEST" ]; then
echo "build-test"
echo "[build-test]"

echo "[env]"
pip list --format columns |grep pandas

echo "[running]"
cd /tmp
pwd
conda list pandas
echo "running"
python -c "import pandas; pandas.test(['-n 2'])"
unset PYTHONPATH
python -c 'import pandas; pandas.test(["-n 2", "--skip-slow", "--skip-network", "-r xX", "-m not single"])'

elif [ "$DOC" ]; then
echo "We are not running pytest as this is a doc-build"

elif [ "$COVERAGE" ]; then
echo pytest -s -n 2 -m "not single" --cov=pandas --cov-report xml:/tmp/cov-multiple.xml --junitxml=/tmp/multiple.xml $TEST_ARGS pandas
pytest -s -n 2 -m "not single" --cov=pandas --cov-report xml:/tmp/cov-multiple.xml --junitxml=/tmp/multiple.xml $TEST_ARGS pandas

else
echo pytest -n 2 -m "not single" --junitxml=/tmp/multiple.xml $TEST_ARGS pandas
pytest -n 2 -m "not single" --junitxml=/tmp/multiple.xml $TEST_ARGS pandas # TODO: doctest
echo pytest -n 2 -r xX -m "not single" --junitxml=/tmp/multiple.xml $TEST_ARGS pandas
pytest -n 2 -r xX -m "not single" --junitxml=/tmp/multiple.xml $TEST_ARGS pandas # TODO: doctest
fi

RET="$?"
Expand Down
4 changes: 2 additions & 2 deletions ci/script_single.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ elif [ "$COVERAGE" ]; then
echo pytest -s -m "single" --cov=pandas --cov-report xml:/tmp/cov-single.xml --junitxml=/tmp/single.xml $TEST_ARGS pandas
pytest -s -m "single" --cov=pandas --cov-report xml:/tmp/cov-single.xml --junitxml=/tmp/single.xml $TEST_ARGS pandas
else
echo pytest -m "single" --junitxml=/tmp/single.xml $TEST_ARGS pandas
pytest -m "single" --junitxml=/tmp/single.xml $TEST_ARGS pandas # TODO: doctest
echo pytest -m "single" -r xX --junitxml=/tmp/single.xml $TEST_ARGS pandas
pytest -m "single" -r xX --junitxml=/tmp/single.xml $TEST_ARGS pandas # TODO: doctest
fi

RET="$?"
Expand Down
35 changes: 24 additions & 11 deletions doc/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,47 +34,60 @@
SPHINX_BUILD = 'sphinxbuild'


def upload_dev(user='pandas'):
def _process_user(user):
if user is None or user is False:
user = ''
else:
user = user + '@'
return user


def upload_dev(user=None):
'push a copy to the pydata dev directory'
if os.system('cd build/html; rsync -avz . {0}@pandas.pydata.org'
user = _process_user(user)
if os.system('cd build/html; rsync -avz . {0}pandas.pydata.org'
':/usr/share/nginx/pandas/pandas-docs/dev/ -essh'.format(user)):
raise SystemExit('Upload to Pydata Dev failed')


def upload_dev_pdf(user='pandas'):
def upload_dev_pdf(user=None):
'push a copy to the pydata dev directory'
if os.system('cd build/latex; scp pandas.pdf {0}@pandas.pydata.org'
user = _process_user(user)
if os.system('cd build/latex; scp pandas.pdf {0}pandas.pydata.org'
':/usr/share/nginx/pandas/pandas-docs/dev/'.format(user)):
raise SystemExit('PDF upload to Pydata Dev failed')


def upload_stable(user='pandas'):
def upload_stable(user=None):
'push a copy to the pydata stable directory'
if os.system('cd build/html; rsync -avz . {0}@pandas.pydata.org'
user = _process_user(user)
if os.system('cd build/html; rsync -avz . {0}pandas.pydata.org'
':/usr/share/nginx/pandas/pandas-docs/stable/ -essh'.format(user)):
raise SystemExit('Upload to stable failed')


def upload_stable_pdf(user='pandas'):
def upload_stable_pdf(user=None):
'push a copy to the pydata dev directory'
if os.system('cd build/latex; scp pandas.pdf {0}@pandas.pydata.org'
user = _process_user(user)
if os.system('cd build/latex; scp pandas.pdf {0}pandas.pydata.org'
':/usr/share/nginx/pandas/pandas-docs/stable/'.format(user)):
raise SystemExit('PDF upload to stable failed')


def upload_prev(ver, doc_root='./', user='pandas'):
def upload_prev(ver, doc_root='./', user=None):
'push a copy of older release to appropriate version directory'
user = _process_user(user)
local_dir = doc_root + 'build/html'
remote_dir = '/usr/share/nginx/pandas/pandas-docs/version/%s/' % ver
cmd = 'cd %s; rsync -avz . %s@pandas.pydata.org:%s -essh'
cmd = 'cd %s; rsync -avz . %spandas.pydata.org:%s -essh'
cmd = cmd % (local_dir, user, remote_dir)
print(cmd)
if os.system(cmd):
raise SystemExit(
'Upload to %s from %s failed' % (remote_dir, local_dir))

local_dir = doc_root + 'build/latex'
pdf_cmd = 'cd %s; scp pandas.pdf %s@pandas.pydata.org:%s'
pdf_cmd = 'cd %s; scp pandas.pdf %spandas.pydata.org:%s'
pdf_cmd = pdf_cmd % (local_dir, user, remote_dir)
if os.system(pdf_cmd):
raise SystemExit('Upload PDF to %s from %s failed' % (ver, doc_root))
Expand Down
1 change: 1 addition & 0 deletions doc/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -724,6 +724,7 @@ Serialization / IO / Conversion
Series.to_dense
Series.to_string
Series.to_clipboard
Series.to_latex

Sparse
~~~~~~
Expand Down
8 changes: 8 additions & 0 deletions doc/source/categorical.rst
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,14 @@ the original values:

np.asarray(cat) > base

When you compare two unordered categoricals with the same categories, the order is not considered:

.. ipython:: python

c1 = pd.Categorical(['a', 'b'], categories=['a', 'b'], ordered=False)
c2 = pd.Categorical(['a', 'b'], categories=['b', 'a'], ordered=False)
c1 == c2

Operations
----------

Expand Down
2 changes: 1 addition & 1 deletion doc/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ installed), make sure you have `pytest
Dependencies
------------

* `setuptools <http://pythonhosted.org/setuptools>`__
* `setuptools <https://setuptools.readthedocs.io/en/latest/>`__
* `NumPy <http://www.numpy.org>`__: 1.7.1 or higher
* `python-dateutil <http://labix.org/python-dateutil>`__: 1.5 or higher
* `pytz <http://pytz.sourceforge.net/>`__: Needed for time zone support
Expand Down
2 changes: 1 addition & 1 deletion doc/source/style.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"\n",
"<span style=\"color: red\">*Provisional: This is a new feature and still under development. We'll be adding features and possibly making breaking changes in future releases. We'd love to hear your feedback.*</span>\n",
"\n",
"This document is written as a Jupyter Notebook, and can be viewed or downloaded [here](http://nbviewer.ipython.org/github/pandas-dev/pandas/blob/master/doc/source/html-styling.ipynb).\n",
"This document is written as a Jupyter Notebook, and can be viewed or downloaded [here](http://nbviewer.ipython.org/github/pandas-dev/pandas/blob/master/doc/source/style.ipynb).\n",
"\n",
"You can apply **conditional formatting**, the visual styling of a DataFrame\n",
"depending on the data within, by using the ``DataFrame.style`` property.\n",
Expand Down
11 changes: 11 additions & 0 deletions doc/source/themes/nature_with_gtoc/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,4 +94,15 @@ <h3 style="margin-top: 1.5em;">{{ _('Search') }}</h3>
});
});
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-27880019-2']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
{% endblock %}
2 changes: 2 additions & 0 deletions doc/source/whatsnew.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ What's New

These are new features and improvements of note in each release.

.. include:: whatsnew/v0.20.2.txt

.. include:: whatsnew/v0.20.0.txt

.. include:: whatsnew/v0.19.2.txt
Expand Down
Loading