Skip to content

Commit 9ec5917

Browse files
committed
Merge remote-tracking branch 'upstream/master' into remove-panel
2 parents 53abf20 + 46adc5b commit 9ec5917

File tree

107 files changed

+744
-987
lines changed

Some content is hidden

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

107 files changed

+744
-987
lines changed

ci/deps/azure-35-compat.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies:
1111
- openpyxl=2.4.8
1212
- pytables=3.4.2
1313
- python-dateutil=2.6.1
14-
- python=3.5.*
14+
- python=3.5.3
1515
- pytz=2017.2
1616
- scipy=0.19.0
1717
- xlrd=1.1.0

ci/deps/azure-37-locale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ dependencies:
1010
- jinja2
1111
- lxml
1212
- matplotlib
13+
- moto
1314
- nomkl
1415
- numexpr
1516
- numpy
@@ -32,4 +33,3 @@ dependencies:
3233
- pip
3334
- pip:
3435
- hypothesis>=3.58.0
35-
- moto # latest moto in conda-forge fails with 3.7, move to conda dependencies when this is fixed

ci/deps/azure-windows-37.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ dependencies:
1010
- jinja2
1111
- lxml
1212
- matplotlib=2.2.*
13+
- moto
1314
- numexpr
1415
- numpy=1.14.*
1516
- openpyxl
@@ -29,6 +30,5 @@ dependencies:
2930
- pytest-xdist
3031
- pytest-mock
3132
- pytest-azurepipelines
32-
- moto
3333
- hypothesis>=3.58.0
3434
- pyreadstat

ci/deps/travis-36-cov.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ dependencies:
1212
- geopandas
1313
- html5lib
1414
- matplotlib
15+
- moto
1516
- nomkl
1617
- numexpr
1718
- numpy=1.15.*
@@ -46,6 +47,5 @@ dependencies:
4647
- pip:
4748
- brotlipy
4849
- coverage
49-
- moto
5050
- pandas-datareader
5151
- python-dateutil

ci/deps/travis-36-locale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ dependencies:
1414
- jinja2
1515
- lxml=3.8.0
1616
- matplotlib=3.0.*
17+
- moto
1718
- nomkl
1819
- numexpr
1920
- numpy
@@ -36,7 +37,6 @@ dependencies:
3637
- pytest>=4.0.2
3738
- pytest-xdist
3839
- pytest-mock
39-
- moto
4040
- pip
4141
- pip:
4242
- hypothesis>=3.58.0

doc/source/development/contributing.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ We'll now kick off a three-step process:
178178
# Create and activate the build environment
179179
conda env create -f environment.yml
180180
conda activate pandas-dev
181-
conda uninstall --force pandas
182181
183182
# or with older versions of Anaconda:
184183
source activate pandas-dev

doc/source/getting_started/10min.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,6 @@ See the :ref:`Plotting <visualization>` docs.
712712
plt.close('all')
713713
714714
.. ipython:: python
715-
:okwarning:
716715
717716
ts = pd.Series(np.random.randn(1000),
718717
index=pd.date_range('1/1/2000', periods=1000))

doc/source/reference/frame.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ Reindexing / selection / label manipulation
198198
DataFrame.idxmin
199199
DataFrame.last
200200
DataFrame.reindex
201-
DataFrame.reindex_axis
202201
DataFrame.reindex_like
203202
DataFrame.rename
204203
DataFrame.rename_axis
@@ -337,7 +336,6 @@ Serialization / IO / conversion
337336
.. autosummary::
338337
:toctree: api/
339338

340-
DataFrame.from_csv
341339
DataFrame.from_dict
342340
DataFrame.from_items
343341
DataFrame.from_records

doc/source/user_guide/advanced.rst

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -965,21 +965,26 @@ If you select a label *contained* within an interval, this will also select the
965965
df.loc[2.5]
966966
df.loc[[2.5, 3.5]]
967967
968-
``Interval`` and ``IntervalIndex`` are used by ``cut`` and ``qcut``:
968+
:func:`cut` and :func:`qcut` both return a ``Categorical`` object, and the bins they
969+
create are stored as an ``IntervalIndex`` in its ``.categories`` attribute.
969970

970971
.. ipython:: python
971972
972973
c = pd.cut(range(4), bins=2)
973974
c
974975
c.categories
975976
976-
Furthermore, ``IntervalIndex`` allows one to bin *other* data with these same
977-
bins, with ``NaN`` representing a missing value similar to other dtypes.
977+
:func:`cut` also accepts an ``IntervalIndex`` for its ``bins`` argument, which enables
978+
a useful pandas idiom. First, We call :func:`cut` with some data and ``bins`` set to a
979+
fixed number, to generate the bins. Then, we pass the values of ``.categories`` as the
980+
``bins`` argument in subsequent calls to :func:`cut`, supplying new data which will be
981+
binned into the same bins.
978982

979983
.. ipython:: python
980984
981985
pd.cut([0, 3, 5, 1], bins=c.categories)
982986
987+
Any value which falls outside all bins will be assigned a ``NaN`` value.
983988

984989
Generating ranges of intervals
985990
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -1108,6 +1113,8 @@ the :meth:`~Index.is_unique` attribute.
11081113
weakly_monotonic.is_monotonic_increasing
11091114
weakly_monotonic.is_monotonic_increasing & weakly_monotonic.is_unique
11101115
1116+
.. _advanced.endpoints_are_inclusive:
1117+
11111118
Endpoints are inclusive
11121119
~~~~~~~~~~~~~~~~~~~~~~~
11131120

@@ -1137,7 +1144,7 @@ index can be somewhat complicated. For example, the following does not work:
11371144
s.loc['c':'e' + 1]
11381145

11391146
A very common use case is to limit a time series to start and end at two
1140-
specific dates. To enable this, we made the design to make label-based
1147+
specific dates. To enable this, we made the design choice to make label-based
11411148
slicing include both endpoints:
11421149

11431150
.. ipython:: python

doc/source/user_guide/indexing.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ of multi-axis indexing.
6161
* A list or array of labels ``['a', 'b', 'c']``.
6262
* A slice object with labels ``'a':'f'`` (Note that contrary to usual python
6363
slices, **both** the start and the stop are included, when present in the
64-
index! See :ref:`Slicing with labels
65-
<indexing.slicing_with_labels>`.).
64+
index! See :ref:`Slicing with labels <indexing.slicing_with_labels>`
65+
and :ref:`Endpoints are inclusive <advanced.endpoints_are_inclusive>`.)
6666
* A boolean array
6767
* A ``callable`` function with one argument (the calling Series or DataFrame) and
6868
that returns valid output for indexing (one of the above).
@@ -335,8 +335,7 @@ The ``.loc`` attribute is the primary access method. The following are valid inp
335335
* A list or array of labels ``['a', 'b', 'c']``.
336336
* A slice object with labels ``'a':'f'`` (Note that contrary to usual python
337337
slices, **both** the start and the stop are included, when present in the
338-
index! See :ref:`Slicing with labels
339-
<indexing.slicing_with_labels>`.).
338+
index! See :ref:`Slicing with labels <indexing.slicing_with_labels>`.
340339
* A boolean array.
341340
* A ``callable``, see :ref:`Selection By Callable <indexing.callable>`.
342341

@@ -418,6 +417,9 @@ error will be raised (since doing otherwise would be computationally expensive,
418417
as well as potentially ambiguous for mixed type indexes). For instance, in the
419418
above example, ``s.loc[1:6]`` would raise ``KeyError``.
420419

420+
For the rationale behind this behavior, see
421+
:ref:`Endpoints are inclusive <advanced.endpoints_are_inclusive>`.
422+
421423
.. _indexing.integer:
422424

423425
Selection by position

0 commit comments

Comments
 (0)