Skip to content

Commit 1661c08

Browse files
committed
2 parents 91b8d28 + 0e219d7 commit 1661c08

File tree

105 files changed

+1487
-487
lines changed

Some content is hidden

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

105 files changed

+1487
-487
lines changed

appveyor.yml

+13-22
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,19 @@ environment:
1717

1818
matrix:
1919

20-
# disable python 3.4 ATM
21-
#- PYTHON: "C:\\Python34_64"
22-
# PYTHON_VERSION: "3.4"
23-
# PYTHON_ARCH: "64"
24-
# CONDA_PY: "34"
25-
# CONDA_NPY: "19"
26-
27-
- PYTHON: "C:\\Python27_64"
20+
- CONDA_ROOT: "C:\\Miniconda3.5_64"
21+
PYTHON_VERSION: "3.6"
22+
PYTHON_ARCH: "64"
23+
CONDA_PY: "36"
24+
CONDA_NPY: "111"
25+
26+
- CONDA_ROOT: "C:\\Miniconda3.5_64"
2827
PYTHON_VERSION: "2.7"
2928
PYTHON_ARCH: "64"
3029
CONDA_PY: "27"
3130
CONDA_NPY: "110"
3231

33-
- PYTHON: "C:\\Python35_64"
32+
- CONDA_ROOT: "C:\\Miniconda3.5_64"
3433
PYTHON_VERSION: "3.5"
3534
PYTHON_ARCH: "64"
3635
CONDA_PY: "35"
@@ -45,9 +44,6 @@ platform:
4544
# all our python builds have to happen in tests_script...
4645
build: false
4746

48-
init:
49-
- "ECHO %PYTHON_VERSION% %PYTHON%"
50-
5147
install:
5248
# cancel older builds for the same PR
5349
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
@@ -58,7 +54,7 @@ install:
5854
# this installs the appropriate Miniconda (Py2/Py3, 32/64 bit)
5955
# updates conda & installs: conda-build jinja2 anaconda-client
6056
- powershell .\ci\install.ps1
61-
- SET PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%
57+
- SET PATH=%CONDA_ROOT%;%CONDA_ROOT%\Scripts;%PATH%
6258
- echo "install"
6359
- cd
6460
- ls -ltr
@@ -69,22 +65,15 @@ install:
6965

7066
# install our build environment
7167
- cmd: conda config --set show_channel_urls true --set always_yes true --set changeps1 false
72-
- cmd: conda update -q conda
73-
74-
# fix conda-build version
75-
# https://github.com/conda/conda-build/issues/1001
76-
# disabling 3.4 as windows complains upon compiling byte
77-
# code
78-
79-
- cmd: conda install conda-build=1.21.7
68+
#- cmd: conda update -q conda
69+
- cmd: conda install conda=4.2.15
8070
- cmd: conda config --set ssl_verify false
8171

8272
# add the pandas channel *before* defaults to have defaults take priority
8373
- cmd: conda config --add channels conda-forge
8474
- cmd: conda config --add channels pandas
8575
- cmd: conda config --remove channels defaults
8676
- cmd: conda config --add channels defaults
87-
- cmd: conda install anaconda-client
8877

8978
# this is now the downloaded conda...
9079
- cmd: conda info -a
@@ -98,6 +87,8 @@ install:
9887
- SET REQ=ci\requirements-%PYTHON_VERSION%-%PYTHON_ARCH%.run
9988
- cmd: echo "installing requirements from %REQ%"
10089
- cmd: conda install -n pandas -q --file=%REQ%
90+
- cmd: conda list -n pandas
91+
- cmd: echo "installing requirements from %REQ% - done"
10192
- ps: conda install -n pandas (conda build ci\appveyor.recipe -q --output)
10293

10394
test_script:

asv_bench/benchmarks/groupby.py

-3
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,3 @@ def time_shift(self):
690690
def time_transform_dataframe(self):
691691
# GH 12737
692692
self.df_nans.groupby('key').transform('first')
693-
694-
695-

asv_bench/benchmarks/plotting.py

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ def setup(self):
2020
def time_plot_regular(self):
2121
self.df.plot()
2222

23+
def time_plot_regular_compat(self):
24+
self.df.plot(x_compat=True)
25+
2326

2427
class Misc(object):
2528
goal_time = 0.6

ci/appveyor.recipe/meta.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package:
22
name: pandas
3-
version: 0.18.1
3+
version: 0.20.0
44

55
build:
66
number: {{environ.get('APPVEYOR_BUILD_NUMBER', 0)}} # [win]

ci/install.ps1

+3-3
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ function UpdateConda ($python_home) {
8484

8585

8686
function main () {
87-
InstallMiniconda $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON
88-
UpdateConda $env:PYTHON
89-
InstallCondaPackages $env:PYTHON "conda-build jinja2 anaconda-client"
87+
InstallMiniconda "3.5" $env:PYTHON_ARCH $env:CONDA_ROOT
88+
UpdateConda $env:CONDA_ROOT
89+
InstallCondaPackages $env:CONDA_ROOT "conda-build jinja2 anaconda-client"
9090
}
9191

9292
main

ci/install_appveyor.ps1

-133
This file was deleted.

ci/requirements-3.6-64.run

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
python-dateutil
2+
pytz
3+
numpy
4+
openpyxl
5+
xlsxwriter
6+
xlrd
7+
#xlwt
8+
scipy
9+
feather-format
10+
numexpr
11+
pytables
12+
matplotlib
13+
blosc

ci/requirements-3.6.pip

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
xlwt

ci/requirements-3.6.run

+16
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,19 @@ python-dateutil
22
pytz
33
numpy
44
scipy
5+
openpyxl
6+
xlsxwriter
7+
xlrd
8+
# xlwt (installed via pip)
9+
numexpr
10+
pytables
11+
# matplotlib (not avail on defaults ATM)
12+
lxml
13+
html5lib
14+
jinja2
15+
sqlalchemy
16+
pymysql
17+
# psycopg2 (not avail on defaults ATM)
18+
beautifulsoup4
19+
s3fs
20+
xarray

ci/requirements-3.6.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
3+
source activate pandas
4+
5+
echo "install 36"
6+
7+
conda install -n pandas -c conda-forge feather-format

doc/source/api.rst

-2
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,6 @@ Reshaping, sorting
418418
Series.reorder_levels
419419
Series.sort_values
420420
Series.sort_index
421-
Series.sortlevel
422421
Series.swaplevel
423422
Series.unstack
424423
Series.searchsorted
@@ -931,7 +930,6 @@ Reshaping, sorting, transposing
931930
DataFrame.reorder_levels
932931
DataFrame.sort_values
933932
DataFrame.sort_index
934-
DataFrame.sortlevel
935933
DataFrame.nlargest
936934
DataFrame.nsmallest
937935
DataFrame.swaplevel

doc/source/io.rst

+32
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,16 @@ skipinitialspace : boolean, default ``False``
187187
skiprows : list-like or integer, default ``None``
188188
Line numbers to skip (0-indexed) or number of lines to skip (int) at the start
189189
of the file.
190+
191+
If callable, the callable function will be evaluated against the row
192+
indices, returning True if the row should be skipped and False otherwise:
193+
194+
.. ipython:: python
195+
196+
data = 'col1,col2,col3\na,b,1\na,b,2\nc,d,3'
197+
pd.read_csv(StringIO(data))
198+
pd.read_csv(StringIO(data), skiprows=lambda x: x % 2 != 0)
199+
190200
skipfooter : int, default ``0``
191201
Number of lines at bottom of file to skip (unsupported with engine='c').
192202
skip_footer : int, default ``0``
@@ -644,6 +654,15 @@ file, either using the column names, position numbers or a callable:
644654
pd.read_csv(StringIO(data), usecols=[0, 2, 3])
645655
pd.read_csv(StringIO(data), usecols=lambda x: x.upper() in ['A', 'C'])
646656
657+
The ``usecols`` argument can also be used to specify which columns not to
658+
use in the final result:
659+
660+
.. ipython:: python
661+
pd.read_csv(StringIO(data), usecols=lambda x: x not in ['a', 'c'])
662+
663+
In this case, the callable is specifying that we exclude the "a" and "c"
664+
columns from the output.
665+
647666
Comments and Empty Lines
648667
''''''''''''''''''''''''
649668

@@ -1206,6 +1225,19 @@ You can elect to skip bad lines:
12061225
0 1 2 3
12071226
1 8 9 10
12081227
1228+
You can also use the ``usecols`` parameter to eliminate extraneous column
1229+
data that appear in some lines but not others:
1230+
1231+
.. code-block:: ipython
1232+
1233+
In [30]: pd.read_csv(StringIO(data), usecols=[0, 1, 2])
1234+
1235+
Out[30]:
1236+
a b c
1237+
0 1 2 3
1238+
1 4 5 6
1239+
2 8 9 10
1240+
12091241
.. _io.quoting:
12101242

12111243
Quoting and Escape Characters

0 commit comments

Comments
 (0)