Skip to content

Commit 6e06646

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 6cb196d + 64c3491 commit 6e06646

15 files changed

+209
-188
lines changed

ci/code_checks.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -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

doc/source/basics.rst

+2-2
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

+9-9
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

+2-2
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

+4-4
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

+17-17
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

doc/source/dsintro.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ pandas object. Like Series, DataFrame accepts many different kinds of input:
249249
* Dict of 1D ndarrays, lists, dicts, or Series
250250
* 2-D numpy.ndarray
251251
* `Structured or record
252-
<http://docs.scipy.org/doc/numpy/user/basics.rec.html>`__ ndarray
252+
<https://docs.scipy.org/doc/numpy/user/basics.rec.html>`__ ndarray
253253
* A ``Series``
254254
* Another ``DataFrame``
255255

@@ -476,7 +476,7 @@ Assigning New Columns in Method Chains
476476
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
477477

478478
Inspired by `dplyr's
479-
<http://cran.rstudio.com/web/packages/dplyr/vignettes/introduction.html#mutate>`__
479+
<https://dplyr.tidyverse.org/reference/mutate.html>`__
480480
``mutate`` verb, DataFrame has an :meth:`~pandas.DataFrame.assign`
481481
method that allows you to easily create new columns that are potentially
482482
derived from existing columns.
@@ -815,7 +815,7 @@ accessed like an attribute:
815815
df
816816
df.foo1
817817
818-
The columns are also connected to the `IPython <http://ipython.org>`__
818+
The columns are also connected to the `IPython <https://ipython.org>`__
819819
completion mechanism so they can be tab-completed:
820820

821821
.. code-block:: ipython
@@ -834,7 +834,7 @@ Panel
834834
a future version. See the section :ref:`Deprecate Panel <dsintro.deprecate_panel>`.
835835

836836
Panel is a somewhat less-used, but still important container for 3-dimensional
837-
data. The term `panel data <http://en.wikipedia.org/wiki/Panel_data>`__ is
837+
data. The term `panel data <https://en.wikipedia.org/wiki/Panel_data>`__ is
838838
derived from econometrics and is partially responsible for the name pandas:
839839
pan(el)-da(ta)-s. The names for the 3 axes are intended to give some semantic
840840
meaning to describing operations involving panel data and, in particular,
@@ -1024,7 +1024,7 @@ Oftentimes, one can simply use a MultiIndex ``DataFrame`` for easily working wit
10241024

10251025
In addition, the ``xarray`` package was built from the ground up, specifically in order to
10261026
support the multi-dimensional analysis that is one of ``Panel`` s main use cases.
1027-
`Here is a link to the xarray panel-transition documentation <http://xarray.pydata.org/en/stable/pandas.html#panel-transition>`__.
1027+
`Here is a link to the xarray panel-transition documentation <https://xarray.pydata.org/en/stable/pandas.html#panel-transition>`__.
10281028

10291029
.. ipython:: python
10301030
:okwarning:
@@ -1046,4 +1046,4 @@ Alternatively, one can convert to an xarray ``DataArray``.
10461046
10471047
p.to_xarray()
10481048
1049-
You can see the full-documentation for the `xarray package <http://xarray.pydata.org/en/stable/>`__.
1049+
You can see the full-documentation for the `xarray package <https://xarray.pydata.org/en/stable/>`__.

0 commit comments

Comments
 (0)