Skip to content

Commit c690260

Browse files
committed
Merge remote-tracking branch 'upstream/master' into multi-index-join
2 parents c75108d + c6366f5 commit c690260

Some content is hidden

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

68 files changed

+589
-524
lines changed

ci/code_checks.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if [[ -z "$CHECK" || "$CHECK" == "lint" ]]; then
4949
# Note: this grep pattern is (intended to be) equivalent to the python
5050
# regex r'(?<![ ->])> '
5151
MSG='Linting .pyx code for spacing conventions in casting' ; echo $MSG
52-
! grep -r -E --include '*.pyx' --include '*.pxi.in' '> ' pandas/_libs | grep -v '[ ->]> '
52+
! grep -r -E --include '*.pyx' --include '*.pxi.in' '[a-zA-Z0-9*]> ' pandas/_libs
5353
RET=$(($RET + $?)) ; echo $MSG "DONE"
5454

5555
# readability/casting: Warnings about C casting instead of C++ casting
@@ -131,7 +131,7 @@ if [[ -z "$CHECK" || "$CHECK" == "doctests" ]]; then
131131

132132
MSG='Doctests frame.py' ; echo $MSG
133133
pytest -q --doctest-modules pandas/core/frame.py \
134-
-k"-axes -combine -itertuples -join -nlargest -nsmallest -nunique -pivot_table -quantile -query -reindex -reindex_axis -replace -round -set_index -stack -to_stata"
134+
-k"-axes -combine -itertuples -join -nunique -pivot_table -quantile -query -reindex -reindex_axis -replace -round -set_index -stack -to_stata"
135135
RET=$(($RET + $?)) ; echo $MSG "DONE"
136136

137137
MSG='Doctests series.py' ; echo $MSG

ci/requirements-optional-conda.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
beautifulsoup4>=4.2.1
22
blosc
33
bottleneck>=1.2.0
4-
fastparquet
4+
fastparquet>=0.1.2
55
gcsfs
66
html5lib
77
ipython>=5.6.0
@@ -12,7 +12,7 @@ matplotlib>=2.0.0
1212
nbsphinx
1313
numexpr>=2.6.1
1414
openpyxl
15-
pyarrow>=0.4.1
15+
pyarrow>=0.7.0
1616
pymysql
1717
pytables>=3.4.2
1818
pytest-cov

ci/requirements-optional-pip.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
beautifulsoup4>=4.2.1
44
blosc
55
bottleneck>=1.2.0
6-
fastparquet
6+
fastparquet>=0.1.2
77
gcsfs
88
html5lib
99
ipython>=5.6.0
@@ -14,9 +14,9 @@ matplotlib>=2.0.0
1414
nbsphinx
1515
numexpr>=2.6.1
1616
openpyxl
17-
pyarrow>=0.4.1
17+
pyarrow>=0.7.0
1818
pymysql
19-
tables
19+
pytables>=3.4.2
2020
pytest-cov
2121
pytest-xdist
2222
s3fs
@@ -27,4 +27,4 @@ statsmodels
2727
xarray
2828
xlrd
2929
xlsxwriter
30-
xlwt
30+
xlwt

ci/travis-27.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies:
2222
- patsy
2323
- psycopg2
2424
- py
25-
- pyarrow=0.4.1
25+
- pyarrow=0.7.0
2626
- PyCrypto
2727
- pymysql=0.6.3
2828
- pytables

ci/travis-37-numpydev.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ dependencies:
1313
- "git+git://github.com/dateutil/dateutil.git"
1414
- "-f https://7933911d6844c6c53a7d-47bd50c35cd79bd838daf386af554a83.ssl.cf2.rackcdn.com"
1515
- "--pre"
16-
- "numpy<=1.16.0.dev0+20181015190246"
16+
- "numpy"
1717
- "scipy"

doc/source/basics.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ We encourage you to view the source code of :meth:`~DataFrame.pipe`.
767767

768768
.. _dplyr: https://github.com/hadley/dplyr
769769
.. _magrittr: https://github.com/smbache/magrittr
770-
.. _R: http://www.r-project.org
770+
.. _R: https://www.r-project.org
771771

772772

773773
Row or Column-wise Function Application
@@ -2296,7 +2296,7 @@ For example, to select ``bool`` columns:
22962296
df.select_dtypes(include=[bool])
22972297
22982298
You can also pass the name of a dtype in the `NumPy dtype hierarchy
2299-
<http://docs.scipy.org/doc/numpy/reference/arrays.scalars.html>`__:
2299+
<https://docs.scipy.org/doc/numpy/reference/arrays.scalars.html>`__:
23002300

23012301
.. ipython:: python
23022302

doc/source/comparison_with_sas.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -365,8 +365,8 @@ Length
365365
~~~~~~
366366

367367
SAS determines the length of a character string with the
368-
`LENGTHN <http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a002284668.htm>`__
369-
and `LENGTHC <http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a002283942.htm>`__
368+
`LENGTHN <https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a002284668.htm>`__
369+
and `LENGTHC <https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a002283942.htm>`__
370370
functions. ``LENGTHN`` excludes trailing blanks and ``LENGTHC`` includes trailing blanks.
371371

372372
.. code-block:: sas
@@ -391,7 +391,7 @@ Find
391391
~~~~
392392

393393
SAS determines the position of a character in a string with the
394-
`FINDW <http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a002978282.htm>`__ function.
394+
`FINDW <https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a002978282.htm>`__ function.
395395
``FINDW`` takes the string defined by the first argument and searches for the first position of the substring
396396
you supply as the second argument.
397397

@@ -417,7 +417,7 @@ Substring
417417
~~~~~~~~~
418418

419419
SAS extracts a substring from a string based on its position with the
420-
`SUBSTR <http://www2.sas.com/proceedings/sugi25/25/cc/25p088.pdf>`__ function.
420+
`SUBSTR <https://www2.sas.com/proceedings/sugi25/25/cc/25p088.pdf>`__ function.
421421

422422
.. code-block:: sas
423423
@@ -438,7 +438,7 @@ indexes are zero-based.
438438
Scan
439439
~~~~
440440

441-
The SAS `SCAN <http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000214639.htm>`__
441+
The SAS `SCAN <https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000214639.htm>`__
442442
function returns the nth word from a string. The first argument is the string you want to parse and the
443443
second argument specifies which word you want to extract.
444444

@@ -469,9 +469,9 @@ approaches, but this just shows a simple approach.
469469
Upcase, Lowcase, and Propcase
470470
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
471471

472-
The SAS `UPCASE <http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000245965.htm>`__
473-
`LOWCASE <http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000245912.htm>`__ and
474-
`PROPCASE <http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/a002598106.htm>`__
472+
The SAS `UPCASE <https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000245965.htm>`__
473+
`LOWCASE <https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000245912.htm>`__ and
474+
`PROPCASE <https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/a002598106.htm>`__
475475
functions change the case of the argument.
476476

477477
.. code-block:: sas
@@ -709,7 +709,7 @@ This means that the size of data able to be loaded in pandas is limited by your
709709
machine's memory, but also that the operations on that data may be faster.
710710

711711
If out of core processing is needed, one possibility is the
712-
`dask.dataframe <http://dask.pydata.org/en/latest/dataframe.html>`_
712+
`dask.dataframe <https://dask.pydata.org/en/latest/dataframe.html>`_
713713
library (currently in development) which
714714
provides a subset of pandas functionality for an on-disk ``DataFrame``
715715

doc/source/comparison_with_sql.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Comparison with SQL
55
********************
66
Since many potential pandas users have some familiarity with
7-
`SQL <http://en.wikipedia.org/wiki/SQL>`_, this page is meant to provide some examples of how
7+
`SQL <https://en.wikipedia.org/wiki/SQL>`_, this page is meant to provide some examples of how
88
various SQL operations would be performed using pandas.
99

1010
If you're new to pandas, you might want to first read through :ref:`10 Minutes to pandas<10min>`
@@ -59,7 +59,7 @@ Filtering in SQL is done via a WHERE clause.
5959
LIMIT 5;
6060
6161
DataFrames can be filtered in multiple ways; the most intuitive of which is using
62-
`boolean indexing <http://pandas.pydata.org/pandas-docs/stable/indexing.html#boolean-indexing>`_.
62+
`boolean indexing <https://pandas.pydata.org/pandas-docs/stable/indexing.html#boolean-indexing>`_.
6363

6464
.. ipython:: python
6565

doc/source/contributing_docstring.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function or method, so programmers can understand what it does without having
1616
to read the details of the implementation.
1717

1818
Also, it is a common practice to generate online (html) documentation
19-
automatically from docstrings. `Sphinx <http://www.sphinx-doc.org>`_ serves
19+
automatically from docstrings. `Sphinx <https://www.sphinx-doc.org>`_ serves
2020
this purpose.
2121

2222
Next example gives an idea on how a docstring looks like:
@@ -68,7 +68,7 @@ As PEP-257 is quite open, and some other standards exist on top of it. In the
6868
case of pandas, the numpy docstring convention is followed. The conventions is
6969
explained in this document:
7070

71-
* `numpydoc docstring guide <http://numpydoc.readthedocs.io/en/latest/format.html>`_
71+
* `numpydoc docstring guide <https://numpydoc.readthedocs.io/en/latest/format.html>`_
7272
(which is based in the original `Guide to NumPy/SciPy documentation
7373
<https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt>`_)
7474

@@ -78,7 +78,7 @@ The standard uses reStructuredText (reST). reStructuredText is a markup
7878
language that allows encoding styles in plain text files. Documentation
7979
about reStructuredText can be found in:
8080

81-
* `Sphinx reStructuredText primer <http://www.sphinx-doc.org/en/stable/rest.html>`_
81+
* `Sphinx reStructuredText primer <https://www.sphinx-doc.org/en/stable/rest.html>`_
8282
* `Quick reStructuredText reference <http://docutils.sourceforge.net/docs/user/rst/quickref.html>`_
8383
* `Full reStructuredText specification <http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html>`_
8484

@@ -119,7 +119,7 @@ backticks. It is considered inline code:
119119
function, prefix it with ``~``. For example, ``:class:`~pandas.Series```
120120
will link to ``pandas.Series`` but only display the last part, ``Series``
121121
as the link text. See `Sphinx cross-referencing syntax
122-
<http://www.sphinx-doc.org/en/stable/domains.html#cross-referencing-syntax>`_
122+
<https://www.sphinx-doc.org/en/stable/domains.html#cross-referencing-syntax>`_
123123
for details.
124124

125125
**Good:**

doc/source/cookbook.rst

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Idioms
5252
These are some neat pandas ``idioms``
5353

5454
`if-then/if-then-else on one column, and assignment to another one or more columns:
55-
<http://stackoverflow.com/questions/17128302/python-pandas-idiom-for-if-then-else>`__
55+
<https://stackoverflow.com/questions/17128302/python-pandas-idiom-for-if-then-else>`__
5656

5757
.. ipython:: python
5858
@@ -88,7 +88,7 @@ Or use pandas where after you've set up a mask
8888
df.where(df_mask,-1000)
8989
9090
`if-then-else using numpy's where()
91-
<http://stackoverflow.com/questions/19913659/pandas-conditional-creation-of-a-series-dataframe-column>`__
91+
<https://stackoverflow.com/questions/19913659/pandas-conditional-creation-of-a-series-dataframe-column>`__
9292

9393
.. ipython:: python
9494
@@ -101,7 +101,7 @@ Splitting
101101
*********
102102

103103
`Split a frame with a boolean criterion
104-
<http://stackoverflow.com/questions/14957116/how-to-split-a-dataframe-according-to-a-boolean-criterion>`__
104+
<https://stackoverflow.com/questions/14957116/how-to-split-a-dataframe-according-to-a-boolean-criterion>`__
105105

106106
.. ipython:: python
107107
@@ -115,7 +115,7 @@ Building Criteria
115115
*****************
116116

117117
`Select with multi-column criteria
118-
<http://stackoverflow.com/questions/15315452/selecting-with-complex-criteria-from-pandas-dataframe>`__
118+
<https://stackoverflow.com/questions/15315452/selecting-with-complex-criteria-from-pandas-dataframe>`__
119119

120120
.. ipython:: python
121121
@@ -141,7 +141,7 @@ Building Criteria
141141
df.loc[(df['BBB'] > 25) | (df['CCC'] >= 75), 'AAA'] = 0.1; df
142142
143143
`Select rows with data closest to certain value using argsort
144-
<http://stackoverflow.com/questions/17758023/return-rows-in-a-dataframe-closest-to-a-user-defined-number>`__
144+
<https://stackoverflow.com/questions/17758023/return-rows-in-a-dataframe-closest-to-a-user-defined-number>`__
145145

146146
.. ipython:: python
147147
@@ -152,7 +152,7 @@ Building Criteria
152152
df.loc[(df.CCC-aValue).abs().argsort()]
153153
154154
`Dynamically reduce a list of criteria using a binary operators
155-
<http://stackoverflow.com/questions/21058254/pandas-boolean-operation-in-a-python-list/21058331>`__
155+
<https://stackoverflow.com/questions/21058254/pandas-boolean-operation-in-a-python-list/21058331>`__
156156

157157
.. ipython:: python
158158
@@ -189,7 +189,7 @@ DataFrames
189189
The :ref:`indexing <indexing>` docs.
190190

191191
`Using both row labels and value conditionals
192-
<http://stackoverflow.com/questions/14725068/pandas-using-row-labels-in-boolean-indexing>`__
192+
<https://stackoverflow.com/questions/14725068/pandas-using-row-labels-in-boolean-indexing>`__
193193

194194
.. ipython:: python
195195
@@ -232,7 +232,7 @@ Ambiguity arises when an index consists of integers with a non-zero start or non
232232
df2.loc[1:3] #Label-oriented
233233
234234
`Using inverse operator (~) to take the complement of a mask
235-
<http://stackoverflow.com/questions/14986510/picking-out-elements-based-on-complement-of-indices-in-python-pandas>`__
235+
<https://stackoverflow.com/questions/14986510/picking-out-elements-based-on-complement-of-indices-in-python-pandas>`__
236236

237237
.. ipython:: python
238238
@@ -259,13 +259,13 @@ Panels
259259
pf.loc[:,:,'F'] = pd.DataFrame(data, rng, cols);pf
260260
261261
`Mask a panel by using np.where and then reconstructing the panel with the new masked values
262-
<http://stackoverflow.com/questions/14650341/boolean-mask-in-pandas-panel>`__
262+
<https://stackoverflow.com/questions/14650341/boolean-mask-in-pandas-panel>`__
263263

264264
New Columns
265265
***********
266266

267267
`Efficiently and dynamically creating new columns using applymap
268-
<http://stackoverflow.com/questions/16575868/efficiently-creating-additional-columns-in-a-pandas-dataframe-using-map>`__
268+
<https://stackoverflow.com/questions/16575868/efficiently-creating-additional-columns-in-a-pandas-dataframe-using-map>`__
269269

270270
.. ipython:: python
271271
@@ -279,7 +279,7 @@ New Columns
279279
df[new_cols] = df[source_cols].applymap(categories.get);df
280280
281281
`Keep other columns when using min() with groupby
282-
<http://stackoverflow.com/questions/23394476/keep-other-columns-when-using-min-with-groupby>`__
282+
<https://stackoverflow.com/questions/23394476/keep-other-columns-when-using-min-with-groupby>`__
283283

284284
.. ipython:: python
285285
@@ -308,7 +308,7 @@ MultiIndexing
308308
The :ref:`multindexing <advanced.hierarchical>` docs.
309309

310310
`Creating a MultiIndex from a labeled frame
311-
<http://stackoverflow.com/questions/14916358/reshaping-dataframes-in-pandas-based-on-column-labels>`__
311+
<https://stackoverflow.com/questions/14916358/reshaping-dataframes-in-pandas-based-on-column-labels>`__
312312

313313
.. ipython:: python
314314
@@ -331,7 +331,7 @@ Arithmetic
331331
**********
332332

333333
`Performing arithmetic with a MultiIndex that needs broadcasting
334-
<http://stackoverflow.com/questions/19501510/divide-entire-pandas-multiindex-dataframe-by-dataframe-variable/19502176#19502176>`__
334+
<https://stackoverflow.com/questions/19501510/divide-entire-pandas-multiindex-dataframe-by-dataframe-variable/19502176#19502176>`__
335335

336336
.. ipython:: python
337337
@@ -343,7 +343,7 @@ Slicing
343343
*******
344344

345345
`Slicing a MultiIndex with xs
346-
<http://stackoverflow.com/questions/12590131/how-to-slice-multindex-columns-in-pandas-dataframes>`__
346+
<https://stackoverflow.com/questions/12590131/how-to-slice-multindex-columns-in-pandas-dataframes>`__
347347

348348
.. ipython:: python
349349
@@ -364,7 +364,7 @@ To take the cross section of the 1st level and 1st axis the index:
364364
df.xs('six',level=1,axis=0)
365365
366366
`Slicing a MultiIndex with xs, method #2
367-
<http://stackoverflow.com/questions/14964493/multiindex-based-indexing-in-pandas>`__
367+
<https://stackoverflow.com/questions/14964493/multiindex-based-indexing-in-pandas>`__
368368

369369
.. ipython:: python
370370
@@ -387,13 +387,13 @@ To take the cross section of the 1st level and 1st axis the index:
387387
df.loc[(All,'Math'),(All,'II')]
388388
389389
`Setting portions of a MultiIndex with xs
390-
<http://stackoverflow.com/questions/19319432/pandas-selecting-a-lower-level-in-a-dataframe-to-do-a-ffill>`__
390+
<https://stackoverflow.com/questions/19319432/pandas-selecting-a-lower-level-in-a-dataframe-to-do-a-ffill>`__
391391

392392
Sorting
393393
*******
394394

395395
`Sort by specific column or an ordered list of columns, with a MultiIndex
396-
<http://stackoverflow.com/questions/14733871/mutli-index-sorting-in-pandas>`__
396+
<https://stackoverflow.com/questions/14733871/mutli-index-sorting-in-pandas>`__
397397

398398
.. ipython:: python
399399

0 commit comments

Comments
 (0)