Skip to content

Commit c83551d

Browse files
author
Marc Garcia
committed
Merge remote-tracking branch 'upstream/master' into plot_api
2 parents d063e05 + 87d7cdf commit c83551d

File tree

251 files changed

+1925
-1482
lines changed

Some content is hidden

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

251 files changed

+1925
-1482
lines changed

asv_bench/benchmarks/indexing.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from pandas import (Series, DataFrame, MultiIndex,
66
Int64Index, UInt64Index, Float64Index,
77
IntervalIndex, CategoricalIndex,
8-
IndexSlice, concat, date_range)
8+
IndexSlice, concat, date_range, option_context)
99

1010

1111
class NumericSeriesIndexing:
@@ -335,4 +335,20 @@ def time_assign_with_setitem(self):
335335
self.df[i] = np.random.randn(self.N)
336336

337337

338+
class ChainIndexing:
339+
340+
params = [None, 'warn']
341+
param_names = ['mode']
342+
343+
def setup(self, mode):
344+
self.N = 1000000
345+
346+
def time_chained_indexing(self, mode):
347+
with warnings.catch_warnings(record=True):
348+
with option_context('mode.chained_assignment', mode):
349+
df = DataFrame({'A': np.arange(self.N), 'B': 'foo'})
350+
df2 = df[df.A > self.N // 2]
351+
df2['C'] = 1.0
352+
353+
338354
from .pandas_vb_common import setup # noqa: F401

ci/azure/windows.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ jobs:
2121
displayName: 'Add conda to PATH'
2222
- script: conda update -q -n base conda
2323
displayName: Update conda
24-
- script: conda env create -q --file ci\\deps\\azure-windows-$(CONDA_PY).yaml
24+
- script: |
25+
call activate
26+
conda env create -q --file ci\\deps\\azure-windows-$(CONDA_PY).yaml
2527
displayName: 'Create anaconda environment'
2628
- script: |
2729
call activate pandas-dev

ci/deps/travis-36-locale.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,22 @@ dependencies:
88
- python-blosc
99
- cython>=0.28.2
1010
- fastparquet=0.2.1
11-
- gcsfs=0.1.0
11+
- gcsfs=0.2.2
1212
- html5lib
1313
- ipython
1414
- jinja2
15-
- lxml=3.7.0
16-
- matplotlib=3.0.0
15+
- lxml=3.8.0
16+
- matplotlib=3.0.*
1717
- nomkl
1818
- numexpr
1919
- numpy
2020
- openpyxl
2121
- pandas-gbq=0.8.0
2222
- psycopg2=2.6.2
23-
- pymysql=0.7.9
23+
- pymysql=0.7.11
2424
- pytables
2525
- python-dateutil
26-
# cannot go past python=3.6.6 for matplotlib=3.0.0 due to
27-
# https://github.com/matplotlib/matplotlib/issues/12626
28-
- python=3.6.6
26+
- python=3.6.*
2927
- pytz
3028
- s3fs=0.0.8
3129
- scipy

codecov.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
codecov:
22
branch: master
33

4+
comment: off
5+
46
coverage:
57
status:
68
project:
79
default:
8-
enabled: no
910
target: '82'
1011
patch:
1112
default:
12-
enabled: no
1313
target: '50'

doc/source/development/contributing.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ to build the documentation locally before pushing your changes.
127127

128128
.. _contributing.dev_c:
129129

130-
Installing a C Compiler
130+
Installing a C compiler
131131
~~~~~~~~~~~~~~~~~~~~~~~
132132

133133
Pandas uses C extensions (mostly written using Cython) to speed up certain
@@ -155,7 +155,7 @@ Let us know if you have any difficulties by opening an issue or reaching out on
155155

156156
.. _contributing.dev_python:
157157

158-
Creating a Python Environment
158+
Creating a Python environment
159159
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
160160

161161
Now that you have a C compiler, create an isolated pandas development
@@ -209,7 +209,7 @@ See the full conda docs `here <http://conda.pydata.org/docs>`__.
209209

210210
.. _contributing.pip:
211211

212-
Creating a Python Environment (pip)
212+
Creating a Python environment (pip)
213213
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
214214

215215
If you aren't using conda for your development environment, follow these instructions.
@@ -605,7 +605,7 @@ and run ``flake8`` on them, one after the other.
605605

606606
.. _contributing.import-formatting:
607607

608-
Import Formatting
608+
Import formatting
609609
~~~~~~~~~~~~~~~~~
610610
*pandas* uses `isort <https://pypi.org/project/isort/>`__ to standardise import
611611
formatting across the codebase.
@@ -651,7 +651,7 @@ The `--recursive` flag can be passed to sort all files in a directory.
651651

652652
You can then verify the changes look ok, then git :ref:`commit <contributing.commit-code>` and :ref:`push <contributing.push-code>`.
653653

654-
Backwards Compatibility
654+
Backwards compatibility
655655
~~~~~~~~~~~~~~~~~~~~~~~
656656

657657
Please try to maintain backward compatibility. *pandas* has lots of users with lots of
@@ -699,7 +699,7 @@ See :ref:`contributing.warnings` for more.
699699

700700
.. _contributing.ci:
701701

702-
Testing With Continuous Integration
702+
Testing with continuous integration
703703
-----------------------------------
704704

705705
The *pandas* test suite will run automatically on `Travis-CI <https://travis-ci.org/>`__ and
@@ -930,7 +930,7 @@ options or subtle interactions to test (or think of!) all of them.
930930

931931
.. _contributing.warnings:
932932

933-
Testing Warnings
933+
Testing warnings
934934
~~~~~~~~~~~~~~~~
935935

936936
By default, one of pandas CI workers will fail if any unhandled warnings are emitted.

doc/source/development/contributing_docstring.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ plot will be generated automatically when building the documentation.
929929
930930
.. _docstring.sharing:
931931

932-
Sharing Docstrings
932+
Sharing docstrings
933933
------------------
934934

935935
Pandas has a system for sharing docstrings, with slight variations, between

doc/source/development/extending.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{ header }}
44

55
****************
6-
Extending Pandas
6+
Extending pandas
77
****************
88

99
While pandas provides a rich set of methods, containers, and data types, your
@@ -12,7 +12,7 @@ pandas.
1212

1313
.. _extending.register-accessors:
1414

15-
Registering Custom Accessors
15+
Registering custom accessors
1616
----------------------------
1717

1818
Libraries can use the decorators
@@ -70,7 +70,7 @@ applies only to certain dtypes.
7070

7171
.. _extending.extension-types:
7272

73-
Extension Types
73+
Extension types
7474
---------------
7575

7676
.. versionadded:: 0.23.0
@@ -210,7 +210,7 @@ will
210210

211211
.. _extending.extension.testing:
212212

213-
Testing Extension Arrays
213+
Testing extension arrays
214214
^^^^^^^^^^^^^^^^^^^^^^^^
215215

216216
We provide a test suite for ensuring that your extension arrays satisfy the expected
@@ -238,7 +238,7 @@ for a list of all the tests available.
238238

239239
.. _extending.subclassing-pandas:
240240

241-
Subclassing pandas Data Structures
241+
Subclassing pandas data structures
242242
----------------------------------
243243

244244
.. warning:: There are some easier alternatives before considering subclassing ``pandas`` data structures.
@@ -260,7 +260,7 @@ This section describes how to subclass ``pandas`` data structures to meet more s
260260

261261
You can find a nice example in `geopandas <https://github.com/geopandas/geopandas>`_ project.
262262

263-
Override Constructor Properties
263+
Override constructor properties
264264
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
265265

266266
Each data structure has several *constructor properties* for returning a new
@@ -348,7 +348,7 @@ Below example shows how to define ``SubclassedSeries`` and ``SubclassedDataFrame
348348
>>> type(sliced2)
349349
<class '__main__.SubclassedSeries'>
350350
351-
Define Original Properties
351+
Define original properties
352352
^^^^^^^^^^^^^^^^^^^^^^^^^^
353353

354354
To let original data structures have additional properties, you should let ``pandas`` know what properties are added. ``pandas`` maps unknown properties to data names overriding ``__getattribute__``. Defining original properties can be done in one of 2 ways:

doc/source/development/internals.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ So, for example, ``Series[category]._values`` is a ``Categorical``, while
102102

103103
.. _ref-subclassing-pandas:
104104

105-
Subclassing pandas Data Structures
105+
Subclassing pandas data structures
106106
----------------------------------
107107

108108
This section has been moved to :ref:`extending.subclassing-pandas`.

doc/source/ecosystem.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{ header }}
44

55
****************
6-
pandas Ecosystem
6+
Pandas ecosystem
77
****************
88

99
Increasingly, packages are being built on top of pandas to address specific needs
@@ -26,7 +26,7 @@ substantial projects that you feel should be on this list, please let us know.
2626

2727
.. _ecosystem.stats:
2828

29-
Statistics and Machine Learning
29+
Statistics and machine learning
3030
-------------------------------
3131

3232
`Statsmodels <https://www.statsmodels.org/>`__
@@ -243,7 +243,7 @@ you can obtain for free on the FRED website.
243243

244244
.. _ecosystem.domain:
245245

246-
Domain Specific
246+
Domain specific
247247
---------------
248248

249249
`Geopandas <https://github.com/kjordahl/geopandas>`__
@@ -332,7 +332,7 @@ and check that they're *actually* true.
332332

333333
.. _ecosystem.extensions:
334334

335-
Extension Data Types
335+
Extension data types
336336
--------------------
337337

338338
Pandas provides an interface for defining

doc/source/getting_started/10min.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{{ header }}
44

55
********************
6-
10 Minutes to pandas
6+
10 minutes to pandas
77
********************
88

99
This is a short introduction to pandas, geared mainly for new users.
@@ -16,7 +16,7 @@ Customarily, we import as follows:
1616
import numpy as np
1717
import pandas as pd
1818
19-
Object Creation
19+
Object creation
2020
---------------
2121

2222
See the :ref:`Data Structure Intro section <dsintro>`.
@@ -83,7 +83,7 @@ As you can see, the columns ``A``, ``B``, ``C``, and ``D`` are automatically
8383
tab completed. ``E`` is there as well; the rest of the attributes have been
8484
truncated for brevity.
8585

86-
Viewing Data
86+
Viewing data
8787
------------
8888

8989
See the :ref:`Basics section <basics>`.
@@ -183,7 +183,7 @@ Selecting via ``[]``, which slices the rows.
183183
df[0:3]
184184
df['20130102':'20130104']
185185
186-
Selection by Label
186+
Selection by label
187187
~~~~~~~~~~~~~~~~~~
188188

189189
See more in :ref:`Selection by Label <indexing.label>`.
@@ -224,7 +224,7 @@ For getting fast access to a scalar (equivalent to the prior method):
224224
225225
df.at[dates[0], 'A']
226226
227-
Selection by Position
227+
Selection by position
228228
~~~~~~~~~~~~~~~~~~~~~
229229

230230
See more in :ref:`Selection by Position <indexing.integer>`.
@@ -271,7 +271,7 @@ For getting fast access to a scalar (equivalent to the prior method):
271271
272272
df.iat[1, 1]
273273
274-
Boolean Indexing
274+
Boolean indexing
275275
~~~~~~~~~~~~~~~~
276276

277277
Using a single column's values to select data.
@@ -340,7 +340,7 @@ A ``where`` operation with setting.
340340
df2
341341
342342
343-
Missing Data
343+
Missing data
344344
------------
345345

346346
pandas primarily uses the value ``np.nan`` to represent missing data. It is by
@@ -580,7 +580,7 @@ With a "stacked" DataFrame or Series (having a ``MultiIndex`` as the
580580
stacked.unstack(1)
581581
stacked.unstack(0)
582582
583-
Pivot Tables
583+
Pivot tables
584584
~~~~~~~~~~~~
585585
See the section on :ref:`Pivot Tables <reshaping.pivot>`.
586586

@@ -600,7 +600,7 @@ We can produce pivot tables from this data very easily:
600600
pd.pivot_table(df, values='D', index=['A', 'B'], columns=['C'])
601601
602602
603-
Time Series
603+
Time series
604604
-----------
605605

606606
pandas has simple, powerful, and efficient functionality for performing
@@ -735,7 +735,7 @@ of the columns with labels:
735735
@savefig frame_plot_basic.png
736736
plt.legend(loc='best')
737737
738-
Getting Data In/Out
738+
Getting data in/out
739739
-------------------
740740

741741
CSV

0 commit comments

Comments
 (0)