Skip to content

Commit 8735b58

Browse files
committed
Merge branch 'master' of https://github.com/pandas-dev/pandas into intervalarray
2 parents bdaf49b + 68f3efe commit 8735b58

File tree

133 files changed

+2754
-1764
lines changed

Some content is hidden

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

133 files changed

+2754
-1764
lines changed

azure-pipelines.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
# Adapted from https://github.com/numba/numba/blob/master/azure-pipelines.yml
2+
trigger:
3+
- master
4+
5+
pr:
6+
- master
7+
28
jobs:
39
# Mac and Linux use the same template
410
- template: ci/azure/posix.yml

ci/azure/posix.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ jobs:
3838
LC_ALL: "it_IT.utf8"
3939
EXTRA_APT: "language-pack-it xsel"
4040

41-
py36_32bit:
42-
ENV_FILE: ci/deps/azure-36-32bit.yaml
43-
CONDA_PY: "36"
44-
PATTERN: "not slow and not network and not clipboard"
45-
BITS32: "yes"
41+
#py36_32bit:
42+
# ENV_FILE: ci/deps/azure-36-32bit.yaml
43+
# CONDA_PY: "36"
44+
# PATTERN: "not slow and not network and not clipboard"
45+
# BITS32: "yes"
4646

4747
py37_locale:
4848
ENV_FILE: ci/deps/azure-37-locale.yaml

doc/source/development/contributing_docstring.rst

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Also, it is a common practice to generate online (html) documentation
1717
automatically from docstrings. `Sphinx <https://www.sphinx-doc.org>`_ serves
1818
this purpose.
1919

20-
Next example gives an idea on how a docstring looks like:
20+
The next example gives an idea of what a docstring looks like:
2121

2222
.. code-block:: python
2323
@@ -26,8 +26,8 @@ Next example gives an idea on how a docstring looks like:
2626
Add up two integer numbers.
2727
2828
This function simply wraps the `+` operator, and does not
29-
do anything interesting, except for illustrating what is
30-
the docstring of a very simple function.
29+
do anything interesting, except for illustrating what
30+
the docstring of a very simple function looks like.
3131
3232
Parameters
3333
----------
@@ -56,14 +56,14 @@ Next example gives an idea on how a docstring looks like:
5656
"""
5757
return num1 + num2
5858
59-
Some standards exist about docstrings, so they are easier to read, and they can
60-
be exported to other formats such as html or pdf.
59+
Some standards regarding docstrings exist, which make them easier to read, and allow them
60+
be easily exported to other formats such as html or pdf.
6161

6262
The first conventions every Python docstring should follow are defined in
6363
`PEP-257 <https://www.python.org/dev/peps/pep-0257/>`_.
6464

65-
As PEP-257 is quite open, and some other standards exist on top of it. In the
66-
case of pandas, the numpy docstring convention is followed. The conventions is
65+
As PEP-257 is quite broad, other more specific standards also exist. In the
66+
case of pandas, the numpy docstring convention is followed. These conventions are
6767
explained in this document:
6868

6969
* `numpydoc docstring guide <https://numpydoc.readthedocs.io/en/latest/format.html>`_
@@ -83,8 +83,8 @@ about reStructuredText can be found in:
8383
pandas has some helpers for sharing docstrings between related classes, see
8484
:ref:`docstring.sharing`.
8585

86-
The rest of this document will summarize all the above guides, and will
87-
provide additional convention specific to the pandas project.
86+
The rest of this document will summarize all the above guidelines, and will
87+
provide additional conventions specific to the pandas project.
8888

8989
.. _docstring.tutorial:
9090

@@ -101,9 +101,9 @@ left before or after the docstring. The text starts in the next line after the
101101
opening quotes. The closing quotes have their own line
102102
(meaning that they are not at the end of the last sentence).
103103

104-
In rare occasions reST styles like bold text or italics will be used in
104+
On rare occasions reST styles like bold text or italics will be used in
105105
docstrings, but is it common to have inline code, which is presented between
106-
backticks. It is considered inline code:
106+
backticks. The following are considered inline code:
107107

108108
* The name of a parameter
109109
* Python code, a module, function, built-in, type, literal... (e.g. ``os``,
@@ -235,8 +235,8 @@ The extended summary provides details on what the function does. It should not
235235
go into the details of the parameters, or discuss implementation notes, which
236236
go in other sections.
237237

238-
A blank line is left between the short summary and the extended summary. And
239-
every paragraph in the extended summary is finished by a dot.
238+
A blank line is left between the short summary and the extended summary.
239+
Every paragraph in the extended summary ends with a dot.
240240

241241
The extended summary should provide details on why the function is useful and
242242
their use cases, if it is not too generic.
@@ -542,19 +542,19 @@ first (not an alias like ``np``). If the function is in a module which is not
542542
the main one, like ``scipy.sparse``, list the full module (e.g.
543543
``scipy.sparse.coo_matrix``).
544544

545-
This section, as the previous, also has a header, "See Also" (note the capital
546-
S and A). Also followed by the line with hyphens, and preceded by a blank line.
545+
This section has a header, "See Also" (note the capital
546+
S and A), followed by the line with hyphens and preceded by a blank line.
547547

548548
After the header, we will add a line for each related method or function,
549549
followed by a space, a colon, another space, and a short description that
550-
illustrated what this method or function does, why is it relevant in this
551-
context, and what are the key differences between the documented function and
552-
the one referencing. The description must also finish with a dot.
550+
illustrates what this method or function does, why is it relevant in this
551+
context, and what the key differences are between the documented function and
552+
the one being referenced. The description must also end with a dot.
553553

554-
Note that in "Returns" and "Yields", the description is located in the
555-
following line than the type. But in this section it is located in the same
556-
line, with a colon in between. If the description does not fit in the same
557-
line, it can continue in the next ones, but it has to be indented in them.
554+
Note that in "Returns" and "Yields", the description is located on the line
555+
after the type. In this section, however, it is located on the same
556+
line, with a colon in between. If the description does not fit on the same
557+
line, it can continue onto other lines which must be further indented.
558558

559559
For example:
560560

@@ -587,7 +587,7 @@ Section 6: Notes
587587
~~~~~~~~~~~~~~~~
588588

589589
This is an optional section used for notes about the implementation of the
590-
algorithm. Or to document technical aspects of the function behavior.
590+
algorithm, or to document technical aspects of the function behavior.
591591

592592
Feel free to skip it, unless you are familiar with the implementation of the
593593
algorithm, or you discover some counter-intuitive behavior while writing the
@@ -600,15 +600,15 @@ This section follows the same format as the extended summary section.
600600
Section 7: Examples
601601
~~~~~~~~~~~~~~~~~~~
602602

603-
This is one of the most important sections of a docstring, even if it is
604-
placed in the last position. As often, people understand concepts better
605-
with examples, than with accurate explanations.
603+
This is one of the most important sections of a docstring, despite being
604+
placed in the last position, as often people understand concepts better
605+
by example than through accurate explanations.
606606

607607
Examples in docstrings, besides illustrating the usage of the function or
608-
method, must be valid Python code, that in a deterministic way returns the
609-
presented output, and that can be copied and run by users.
608+
method, must be valid Python code, that returns the given output in a
609+
deterministic way, and that can be copied and run by users.
610610

611-
They are presented as a session in the Python terminal. `>>>` is used to
611+
Examples are presented as a session in the Python terminal. `>>>` is used to
612612
present code. `...` is used for code continuing from the previous line.
613613
Output is presented immediately after the last line of code generating the
614614
output (no blank lines in between). Comments describing the examples can
@@ -636,7 +636,7 @@ A simple example could be:
636636
Return the first elements of the Series.
637637
638638
This function is mainly useful to preview the values of the
639-
Series without displaying the whole of it.
639+
Series without displaying all of it.
640640
641641
Parameters
642642
----------

doc/source/user_guide/dsintro.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,28 @@ The result will be a DataFrame with the same index as the input Series, and
397397
with one column whose name is the original name of the Series (only if no other
398398
column name provided).
399399

400+
.. _basics.dataframe.from_list_dataclasses:
401+
402+
From a list of dataclasses
403+
~~~~~~~~~~~~~~~~~~~~~~~~~~
404+
405+
.. versionadded:: 1.1.0
406+
407+
Data Classes as introduced in `PEP557 <https://www.python.org/dev/peps/pep-0557>`__,
408+
can be passed into the DataFrame constructor.
409+
Passing a list of dataclasses is equivilent to passing a list of dictionaries.
410+
411+
Please be aware, that that all values in the list should be dataclasses, mixing
412+
types in the list would result in a TypeError.
413+
414+
.. ipython:: python
415+
416+
from dataclasses import make_dataclass
417+
418+
Point = make_dataclass("Point", [("x", int), ("y", int)])
419+
420+
pd.DataFrame([Point(0, 0), Point(0, 3), Point(2, 3)])
421+
400422
**Missing data**
401423

402424
Much more will be said on this topic in the :ref:`Missing data <missing_data>`

doc/source/whatsnew/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Version 1.0
2424
.. toctree::
2525
:maxdepth: 2
2626

27+
v1.0.3
2728
v1.0.2
2829
v1.0.1
2930
v1.0.0

doc/source/whatsnew/v1.0.2.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Fixed regressions
1717

1818
**Groupby**
1919

20-
- Fixed regression in :meth:`groupby(..).agg() <pandas.core.groupby.GroupBy.agg>` which was failing on frames with MultiIndex columns and a custom function (:issue:`31777`)
20+
- Fixed regression in :meth:`groupby(..).agg() <pandas.core.groupby.GroupBy.agg>` which was failing on frames with :class:`MultiIndex` columns and a custom function (:issue:`31777`)
2121
- Fixed regression in ``groupby(..).rolling(..).apply()`` (``RollingGroupby``) where the ``raw`` parameter was ignored (:issue:`31754`)
2222
- Fixed regression in :meth:`rolling(..).corr() <pandas.core.window.rolling.Rolling.corr>` when using a time offset (:issue:`31789`)
2323
- Fixed regression in :meth:`groupby(..).nunique() <pandas.core.groupby.DataFrameGroupBy.nunique>` which was modifying the original values if ``NaN`` values were present (:issue:`31950`)
@@ -33,7 +33,7 @@ Fixed regressions
3333

3434
**Reindexing/alignment**
3535

36-
- Fixed regression in :meth:`Series.align` when ``other`` is a DataFrame and ``method`` is not None (:issue:`31785`)
36+
- Fixed regression in :meth:`Series.align` when ``other`` is a :class:`DataFrame` and ``method`` is not ``None`` (:issue:`31785`)
3737
- Fixed regression in :meth:`DataFrame.reindex` and :meth:`Series.reindex` when reindexing with (tz-aware) index and ``method=nearest`` (:issue:`26683`)
3838
- Fixed regression in :meth:`DataFrame.reindex_like` on a :class:`DataFrame` subclass raised an ``AssertionError`` (:issue:`31925`)
3939
- Fixed regression in :class:`DataFrame` arithmetic operations with mis-matched columns (:issue:`31623`)
@@ -81,7 +81,7 @@ Bug fixes
8181

8282
**Datetimelike**
8383

84-
- Bug in :meth:`Series.astype` not copying for tz-naive and tz-aware datetime64 dtype (:issue:`32490`)
84+
- Bug in :meth:`Series.astype` not copying for tz-naive and tz-aware ``datetime64`` dtype (:issue:`32490`)
8585
- Bug where :func:`to_datetime` would raise when passed ``pd.NA`` (:issue:`32213`)
8686
- Improved error message when subtracting two :class:`Timestamp` that result in an out-of-bounds :class:`Timedelta` (:issue:`31774`)
8787

@@ -122,4 +122,4 @@ Bug fixes
122122
Contributors
123123
~~~~~~~~~~~~
124124

125-
.. contributors:: v1.0.1..v1.0.2|HEAD
125+
.. contributors:: v1.0.1..v1.0.2

doc/source/whatsnew/v1.0.3.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
.. _whatsnew_103:
3+
4+
What's new in 1.0.3 (March ??, 2020)
5+
------------------------------------
6+
7+
These are the changes in pandas 1.0.3. See :ref:`release` for a full changelog
8+
including other versions of pandas.
9+
10+
{{ header }}
11+
12+
.. ---------------------------------------------------------------------------
13+
14+
.. _whatsnew_103.regressions:
15+
16+
Fixed regressions
17+
~~~~~~~~~~~~~~~~~
18+
- Fixed regression in ``resample.agg`` when the underlying data is non-writeable (:issue:`31710`)
19+
- Fixed regression in :class:`DataFrame` exponentiation with reindexing (:issue:`32685`)
20+
21+
.. _whatsnew_103.bug_fixes:
22+
23+
Bug fixes
24+
~~~~~~~~~
25+
26+
Contributors
27+
~~~~~~~~~~~~
28+
29+
.. contributors:: v1.0.2..v1.0.3|HEAD

0 commit comments

Comments
 (0)