Skip to content

Commit 6dc5bb8

Browse files
authored
Merge branch 'master' into GH13410-ENHunion_categoricals
2 parents 7afd976 + 34cdfa4 commit 6dc5bb8

File tree

157 files changed

+11796
-11462
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

157 files changed

+11796
-11462
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ matrix:
132132
env:
133133
- PYTHON_VERSION=3.4
134134
- JOB_NAME: "34_nslow"
135+
- LOCALE_OVERRIDE="zh_CN.UTF-8"
135136
- NOSE_ARGS="not slow and not disabled"
136137
- FULL_DEPS=true
137138
- CLIPBOARD=xsel
@@ -141,6 +142,7 @@ matrix:
141142
apt:
142143
packages:
143144
- xsel
145+
- language-pack-zh-hans
144146
# In allow_failures
145147
- python: 3.4
146148
env:
@@ -229,6 +231,7 @@ matrix:
229231
env:
230232
- PYTHON_VERSION=3.4
231233
- JOB_NAME: "34_nslow"
234+
- LOCALE_OVERRIDE="zh_CN.UTF-8"
232235
- NOSE_ARGS="not slow and not disabled"
233236
- FULL_DEPS=true
234237
- CLIPBOARD=xsel
@@ -238,6 +241,7 @@ matrix:
238241
apt:
239242
packages:
240243
- xsel
244+
- language-pack-zh-hans
241245
- python: 3.5
242246
env:
243247
- PYTHON_VERSION=3.5

asv_bench/benchmarks/frame_methods.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,20 @@ def time_frame_from_records_generator_nrows(self):
433433

434434

435435

436+
#-----------------------------------------------------------------------------
437+
# nunique
438+
439+
class frame_nunique(object):
440+
441+
def setup(self):
442+
self.data = np.random.randn(10000, 1000)
443+
self.df = DataFrame(self.data)
444+
445+
def time_frame_nunique(self):
446+
self.df.nunique()
447+
448+
449+
436450
#-----------------------------------------------------------------------------
437451
# duplicated
438452

asv_bench/benchmarks/groupby.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,22 @@ def time_groupby_int_count(self):
251251
self.df.groupby(['key1', 'key2']).count()
252252

253253

254+
#----------------------------------------------------------------------
255+
# nunique() speed
256+
257+
class groupby_nunique(object):
258+
259+
def setup(self):
260+
self.n = 10000
261+
self.df = DataFrame({'key1': randint(0, 500, size=self.n),
262+
'key2': randint(0, 100, size=self.n),
263+
'ints': randint(0, 1000, size=self.n),
264+
'ints2': randint(0, 1000, size=self.n), })
265+
266+
def time_groupby_nunique(self):
267+
self.df.groupby(['key1', 'key2']).nunique()
268+
269+
254270
#----------------------------------------------------------------------
255271
# group with different functions per column
256272

ci/build_docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ if [ x"$DOC_BUILD" != x"" ]; then
2222
echo "Will build docs"
2323

2424
source activate pandas
25-
conda install -n pandas -c r r rpy2 --yes
2625

26+
# install sudo deps
2727
time sudo apt-get $APT_ARGS install dvipng texlive-latex-base texlive-latex-extra
2828

2929
mv "$TRAVIS_BUILD_DIR"/doc /tmp

ci/install_travis.sh

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,47 +16,48 @@
1616
function edit_init()
1717
{
1818
if [ -n "$LOCALE_OVERRIDE" ]; then
19-
echo "Adding locale to the first line of pandas/__init__.py"
19+
echo "[Adding locale to the first line of pandas/__init__.py]"
2020
rm -f pandas/__init__.pyc
2121
sedc="3iimport locale\nlocale.setlocale(locale.LC_ALL, '$LOCALE_OVERRIDE')\n"
2222
sed -i "$sedc" pandas/__init__.py
23-
echo "head -4 pandas/__init__.py"
23+
echo "[head -4 pandas/__init__.py]"
2424
head -4 pandas/__init__.py
2525
echo
2626
fi
2727
}
2828

29+
echo "[install_travis]"
2930
edit_init
3031

3132
home_dir=$(pwd)
32-
echo "home_dir: [$home_dir]"
33+
echo "[home_dir: $home_dir]"
3334

3435
MINICONDA_DIR="$HOME/miniconda3"
3536

3637
if [ -d "$MINICONDA_DIR" ] && [ -e "$MINICONDA_DIR/bin/conda" ] && [ "$USE_CACHE" ]; then
37-
echo "Miniconda install already present from cache: $MINICONDA_DIR"
38+
echo "[Miniconda install already present from cache: $MINICONDA_DIR]"
3839

3940
conda config --set always_yes yes --set changeps1 no || exit 1
40-
echo "update conda"
41+
echo "[update conda]"
4142
conda update -q conda || exit 1
4243

4344
# Useful for debugging any issues with conda
4445
conda info -a || exit 1
4546

4647
# set the compiler cache to work
4748
if [ "${TRAVIS_OS_NAME}" == "linux" ]; then
48-
echo "Using ccache"
49+
echo "[Using ccache]"
4950
export PATH=/usr/lib/ccache:/usr/lib64/ccache:$PATH
5051
gcc=$(which gcc)
51-
echo "gcc: $gcc"
52+
echo "[gcc: $gcc]"
5253
ccache=$(which ccache)
53-
echo "ccache: $ccache"
54+
echo "[ccache: $ccache]"
5455
export CC='ccache gcc'
5556
fi
5657

5758
else
58-
echo "Using clean Miniconda install"
59-
echo "Not using ccache"
59+
echo "[Using clean Miniconda install]"
60+
echo "[Not using ccache]"
6061
rm -rf "$MINICONDA_DIR"
6162
# install miniconda
6263
if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
@@ -66,14 +67,14 @@ else
6667
fi
6768
bash miniconda.sh -b -p "$MINICONDA_DIR" || exit 1
6869

69-
echo "update conda"
70+
echo "[update conda]"
7071
conda config --set ssl_verify false || exit 1
7172
conda config --set always_yes true --set changeps1 false || exit 1
7273
conda update -q conda
7374

7475
# add the pandas channel to take priority
7576
# to add extra packages
76-
echo "add channels"
77+
echo "[add channels]"
7778
conda config --add channels pandas || exit 1
7879
conda config --remove channels defaults || exit 1
7980
conda config --add channels defaults || exit 1
@@ -103,13 +104,19 @@ else
103104
fi
104105

105106
# build deps
107+
echo "[build installs]"
106108
REQ="ci/requirements-${PYTHON_VERSION}${JOB_TAG}.build"
107-
108-
# install deps
109109
if [ -e ${REQ} ]; then
110110
time conda install -n pandas --file=${REQ} || exit 1
111111
fi
112112

113+
# may have addtl installation instructions for this build
114+
echo "[build addtl installs]"
115+
REQ="ci/requirements-${PYTHON_VERSION}${JOB_TAG}.build.sh"
116+
if [ -e ${REQ} ]; then
117+
time bash $REQ || exit 1
118+
fi
119+
113120
source activate pandas
114121

115122
if [ "$BUILD_TEST" ]; then
@@ -122,39 +129,40 @@ if [ "$BUILD_TEST" ]; then
122129
else
123130

124131
# build but don't install
125-
echo "build em"
132+
echo "[build em]"
126133
time python setup.py build_ext --inplace || exit 1
127134

128135
# we may have run installations
129-
echo "conda installs"
136+
echo "[conda installs]"
130137
REQ="ci/requirements-${PYTHON_VERSION}${JOB_TAG}.run"
131138
if [ -e ${REQ} ]; then
132139
time conda install -n pandas --file=${REQ} || exit 1
133140
fi
134141

135142
# we may have additional pip installs
136-
echo "pip installs"
143+
echo "[pip installs]"
137144
REQ="ci/requirements-${PYTHON_VERSION}${JOB_TAG}.pip"
138145
if [ -e ${REQ} ]; then
139-
pip install --upgrade -r $REQ
146+
pip install -r $REQ
140147
fi
141148

142149
# may have addtl installation instructions for this build
150+
echo "[addtl installs]"
143151
REQ="ci/requirements-${PYTHON_VERSION}${JOB_TAG}.sh"
144152
if [ -e ${REQ} ]; then
145153
time bash $REQ || exit 1
146154
fi
147155

148156
# remove any installed pandas package
149157
# w/o removing anything else
150-
echo "removing installed pandas"
158+
echo "[removing installed pandas]"
151159
conda remove pandas --force
152160

153161
# install our pandas
154-
echo "running setup.py develop"
162+
echo "[running setup.py develop]"
155163
python setup.py develop || exit 1
156164

157165
fi
158166

159-
echo "done"
167+
echo "[done]"
160168
exit 0

ci/ironcache/get.py

Lines changed: 0 additions & 41 deletions
This file was deleted.

ci/ironcache/put.py

Lines changed: 0 additions & 48 deletions
This file was deleted.

ci/lint.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@ RET=0
88

99
if [ "$LINT" ]; then
1010

11-
# pandas/rpy is deprecated and will be removed.
1211
# pandas/src is C code, so no need to search there.
1312
echo "Linting *.py"
14-
flake8 pandas --filename=*.py --exclude pandas/rpy,pandas/src
13+
flake8 pandas --filename=*.py --exclude pandas/src
1514
if [ $? -ne "0" ]; then
1615
RET=1
1716
fi

ci/requirements-2.7.run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ html5lib=1.0b2
2020
beautiful-soup=4.2.1
2121
statsmodels
2222
jinja2=2.8
23-
xarray
23+
xarray=0.8.0

ci/requirements-3.4_SLOW.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
python-dateutil
22
pytz
3-
numpy=1.9.3
3+
numpy=1.10*
44
cython

ci/requirements-3.4_SLOW.run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
python-dateutil
22
pytz
3-
numpy=1.9.3
3+
numpy=1.10*
44
openpyxl
55
xlsxwriter
66
xlrd

ci/requirements-3.4_SLOW.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ source activate pandas
44

55
echo "install 34_slow"
66

7-
conda install -n pandas -c conda-forge/label/rc -c conda-forge matplotlib
7+
conda install -n pandas -c conda-forge matplotlib

ci/requirements-3.5.pip

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
xarray==0.9.1

ci/requirements-3.5.run

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ bottleneck
1616
sqlalchemy
1717
pymysql
1818
psycopg2
19-
xarray
2019
s3fs
2120
beautifulsoup4

ci/requirements-3.5_DOC_BUILD.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
source activate pandas
44

5-
echo "install DOC_BUILD"
5+
echo "[install DOC_BUILD deps]"
66

77
conda install -n pandas -c conda-forge feather-format
8+
9+
conda install -n pandas -c r r rpy2 --yes

ci/requirements-3.5_NUMPY_DEV.sh renamed to ci/requirements-3.5_NUMPY_DEV.build.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ echo "install numpy master wheel"
77
# remove the system installed numpy
88
pip uninstall numpy -y
99

10-
# we need these for numpy
11-
12-
# these wheels don't play nice with the conda libgfortran / openblas
13-
# time conda install -n pandas libgfortran openblas || exit 1
14-
1510
# install numpy wheel from master
1611
pip install --pre --upgrade --no-index --timeout=60 --trusted-host travis-dev-wheels.scipy.org -f http://travis-dev-wheels.scipy.org/ numpy scipy
1712

ci/requirements-3.6.pip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
xlwt

0 commit comments

Comments
 (0)