Skip to content

Commit aa503f3

Browse files
Merge branch 'master' of git://github.com/pandas-dev/pandas into bug_groupby_idxmin
2 parents 73a4545 + 79205ea commit aa503f3

File tree

167 files changed

+2694
-2407
lines changed

Some content is hidden

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

167 files changed

+2694
-2407
lines changed

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@
2626
<td>Package Status</td>
2727
<td>
2828
<a href="https://pypi.org/project/pandas/">
29-
<img src="https://img.shields.io/pypi/status/pandas.svg" alt="status" /></td>
29+
<img src="https://img.shields.io/pypi/status/pandas.svg" alt="status" />
3030
</a>
31+
</td>
3132
</tr>
3233
<tr>
3334
<td>License</td>
@@ -73,8 +74,8 @@
7374
<td>Gitter</td>
7475
<td>
7576
<a href="https://gitter.im/pydata/pandas">
76-
<img src="https://badges.gitter.im/Join%20Chat.svg"
77-
</a>
77+
<img src="https://badges.gitter.im/Join%20Chat.svg" />
78+
</a>
7879
</td>
7980
</tr>
8081
</table>

ci/code_checks.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,8 @@ fi
241241
### DOCSTRINGS ###
242242
if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
243243

244-
MSG='Validate docstrings (GL06, GL07, GL09, SS04, PR03, PR05, PR10, EX04, RT04, RT05, SS05, SA05)' ; echo $MSG
245-
$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL06,GL07,GL09,SS04,PR03,PR04,PR05,EX04,RT04,RT05,SS05,SA05
244+
MSG='Validate docstrings (GL03, GL06, GL07, GL09, SS04, SS05, PR03, PR04, PR05, PR10, EX04, RT04, RT05, SA05)' ; echo $MSG
245+
$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL03,GL06,GL07,GL09,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT04,RT05,SA05
246246
RET=$(($RET + $?)) ; echo $MSG "DONE"
247247

248248
fi

doc/make.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -294,14 +294,16 @@ def main():
294294
help='number of jobs used by sphinx-build')
295295
argparser.add_argument('--no-api',
296296
default=False,
297-
help='ommit api and autosummary',
297+
help='omit api and autosummary',
298298
action='store_true')
299299
argparser.add_argument('--single',
300300
metavar='FILENAME',
301301
type=str,
302302
default=None,
303-
help=('filename of section or method name to '
304-
'compile, e.g. "indexing", "DataFrame.join"'))
303+
help=('filename (relative to the "source" folder)'
304+
' of section or method name to compile, e.g. '
305+
'"development/contributing.rst",'
306+
' "ecosystem.rst", "pandas.DataFrame.join"'))
305307
argparser.add_argument('--python-path',
306308
type=str,
307309
default=os.path.dirname(DOC_PATH),
@@ -323,7 +325,7 @@ def main():
323325
# the import of `python_path` correctly. The latter is used to resolve
324326
# the import within the module, injecting it into the global namespace
325327
os.environ['PYTHONPATH'] = args.python_path
326-
sys.path.append(args.python_path)
328+
sys.path.insert(0, args.python_path)
327329
globals()['pandas'] = importlib.import_module('pandas')
328330

329331
# Set the matplotlib backend to the non-interactive Agg backend for all

doc/source/development/contributing.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ 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
181182
182183
# or with older versions of Anaconda:
183184
source activate pandas-dev
@@ -428,10 +429,10 @@ reducing the turn-around time for checking your changes.
428429
python make.py clean
429430
python make.py --no-api
430431

431-
# compile the docs with only a single
432-
# section, that which is in indexing.rst
432+
# compile the docs with only a single section, relative to the "source" folder.
433+
# For example, compiling only this guide (docs/source/development/contributing.rst)
433434
python make.py clean
434-
python make.py --single indexing
435+
python make.py --single development/contributing.rst
435436

436437
# compile the reference docs for a single function
437438
python make.py clean

doc/source/development/index.rst

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
Development
77
===========
88

9+
.. If you update this toctree, also update the manual toctree in the
10+
main index.rst.template
11+
912
.. toctree::
1013
:maxdepth: 2
1114

doc/source/getting_started/10min.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Display the index, columns:
103103
df.columns
104104
105105
:meth:`DataFrame.to_numpy` gives a NumPy representation of the underlying data.
106-
Note that his can be an expensive operation when your :class:`DataFrame` has
106+
Note that this can be an expensive operation when your :class:`DataFrame` has
107107
columns with different data types, which comes down to a fundamental difference
108108
between pandas and NumPy: **NumPy arrays have one dtype for the entire array,
109109
while pandas DataFrames have one dtype per column**. When you call

doc/source/getting_started/dsintro.rst

+6-50
Original file line numberDiff line numberDiff line change
@@ -576,14 +576,14 @@ To write code compatible with all versions of Python, split the assignment in tw
576576
577577
.. warning::
578578

579-
Dependent assignment maybe subtly change the behavior of your code between
579+
Dependent assignment may subtly change the behavior of your code between
580580
Python 3.6 and older versions of Python.
581581

582-
If you wish write code that supports versions of python before and after 3.6,
582+
If you wish to write code that supports versions of python before and after 3.6,
583583
you'll need to take care when passing ``assign`` expressions that
584584

585-
* Updating an existing column
586-
* Referring to the newly updated column in the same ``assign``
585+
* Update an existing column
586+
* Refer to the newly updated column in the same ``assign``
587587

588588
For example, we'll update column "A" and then refer to it when creating "B".
589589

@@ -665,8 +665,8 @@ row-wise. For example:
665665
666666
df - df.iloc[0]
667667
668-
In the special case of working with time series data, and the DataFrame index
669-
also contains dates, the broadcasting will be column-wise:
668+
In the special case of working with time series data, if the DataFrame index
669+
contains dates, the broadcasting will be column-wise:
670670

671671
.. ipython:: python
672672
:okwarning:
@@ -1030,47 +1030,3 @@ method:
10301030
major_axis=pd.date_range('1/1/2000', periods=5),
10311031
minor_axis=['a', 'b', 'c', 'd'])
10321032
panel.to_frame()
1033-
1034-
1035-
.. _dsintro.deprecate_panel:
1036-
1037-
Deprecate Panel
1038-
---------------
1039-
1040-
Over the last few years, pandas has increased in both breadth and depth, with new features,
1041-
datatype support, and manipulation routines. As a result, supporting efficient indexing and functional
1042-
routines for ``Series``, ``DataFrame`` and ``Panel`` has contributed to an increasingly fragmented and
1043-
difficult-to-understand code base.
1044-
1045-
The 3-D structure of a ``Panel`` is much less common for many types of data analysis,
1046-
than the 1-D of the ``Series`` or the 2-D of the ``DataFrame``. Going forward it makes sense for
1047-
pandas to focus on these areas exclusively.
1048-
1049-
Oftentimes, one can simply use a MultiIndex ``DataFrame`` for easily working with higher dimensional data.
1050-
1051-
In addition, the ``xarray`` package was built from the ground up, specifically in order to
1052-
support the multi-dimensional analysis that is one of ``Panel`` s main use cases.
1053-
`Here is a link to the xarray panel-transition documentation <https://xarray.pydata.org/en/stable/pandas.html#panel-transition>`__.
1054-
1055-
.. ipython:: python
1056-
:okwarning:
1057-
1058-
import pandas.util.testing as tm
1059-
p = tm.makePanel()
1060-
p
1061-
1062-
Convert to a MultiIndex DataFrame.
1063-
1064-
.. ipython:: python
1065-
:okwarning:
1066-
1067-
p.to_frame()
1068-
1069-
Alternatively, one can convert to an xarray ``DataArray``.
1070-
1071-
.. ipython:: python
1072-
:okwarning:
1073-
1074-
p.to_xarray()
1075-
1076-
You can see the full-documentation for the `xarray package <https://xarray.pydata.org/en/stable/>`__.

doc/source/getting_started/index.rst

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
Getting started
77
===============
88

9+
.. If you update this toctree, also update the manual toctree in the
10+
main index.rst.template
11+
912
.. toctree::
1013
:maxdepth: 2
1114

doc/source/index.rst.template

+67-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ See the :ref:`overview` for more detail about what's in the library.
2525

2626
{% if single_doc and single_doc.endswith('.rst') -%}
2727
.. toctree::
28-
:maxdepth: 2
28+
:maxdepth: 3
2929

3030
{{ single_doc[:-4] }}
3131
{% elif single_doc %}
@@ -35,7 +35,8 @@ See the :ref:`overview` for more detail about what's in the library.
3535
{{ single_doc }}
3636
{% else -%}
3737
.. toctree::
38-
:maxdepth: 2
38+
:maxdepth: 3
39+
:hidden:
3940
{% endif %}
4041

4142
{% if not single_doc -%}
@@ -51,4 +52,67 @@ See the :ref:`overview` for more detail about what's in the library.
5152
{% if not single_doc -%}
5253
development/index
5354
whatsnew/index
54-
{% endif -%}
55+
{% endif -%}
56+
57+
58+
* :doc:`whatsnew/v0.25.0`
59+
* :doc:`install`
60+
* :doc:`getting_started/index`
61+
62+
* :doc:`getting_started/overview`
63+
* :doc:`getting_started/10min`
64+
* :doc:`getting_started/basics`
65+
* :doc:`getting_started/dsintro`
66+
* :doc:`getting_started/comparison/index`
67+
* :doc:`getting_started/tutorials`
68+
69+
* :doc:`user_guide/index`
70+
71+
* :doc:`user_guide/io`
72+
* :doc:`user_guide/indexing`
73+
* :doc:`user_guide/advanced`
74+
* :doc:`user_guide/merging`
75+
* :doc:`user_guide/reshaping`
76+
* :doc:`user_guide/text`
77+
* :doc:`user_guide/missing_data`
78+
* :doc:`user_guide/categorical`
79+
* :doc:`user_guide/integer_na`
80+
* :doc:`user_guide/visualization`
81+
* :doc:`user_guide/computation`
82+
* :doc:`user_guide/groupby`
83+
* :doc:`user_guide/timeseries`
84+
* :doc:`user_guide/timedeltas`
85+
* :doc:`user_guide/style`
86+
* :doc:`user_guide/options`
87+
* :doc:`user_guide/enhancingperf`
88+
* :doc:`user_guide/sparse`
89+
* :doc:`user_guide/gotchas`
90+
* :doc:`user_guide/cookbook`
91+
92+
* :doc:`ecosystem`
93+
* :doc:`reference/index`
94+
95+
* :doc:`reference/io`
96+
* :doc:`reference/general_functions`
97+
* :doc:`reference/series`
98+
* :doc:`reference/frame`
99+
* :doc:`reference/arrays`
100+
* :doc:`reference/panel`
101+
* :doc:`reference/indexing`
102+
* :doc:`reference/offset_frequency`
103+
* :doc:`reference/window`
104+
* :doc:`reference/groupby`
105+
* :doc:`reference/resampling`
106+
* :doc:`reference/style`
107+
* :doc:`reference/plotting`
108+
* :doc:`reference/general_utility_functions`
109+
* :doc:`reference/extensions`
110+
111+
* :doc:`development/index`
112+
113+
* :doc:`development/contributing`
114+
* :doc:`development/internals`
115+
* :doc:`development/extending`
116+
* :doc:`development/developer`
117+
118+
* :doc:`whatsnew/index`

doc/source/reference/index.rst

+34-31
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ public functions related to data types in pandas.
1919

2020
The ``pandas.core``, ``pandas.compat``, and ``pandas.util`` top-level modules are PRIVATE. Stable functionality in such modules is not guaranteed.
2121

22+
.. If you update this toctree, also update the manual toctree in the
23+
main index.rst.template
24+
2225
.. toctree::
2326
:maxdepth: 2
2427

@@ -41,40 +44,40 @@ public functions related to data types in pandas.
4144
.. This is to prevent warnings in the doc build. We don't want to encourage
4245
.. these methods.
4346
44-
.. toctree::
45-
:hidden:
46-
47-
api/pandas.DataFrame.blocks
48-
api/pandas.DataFrame.as_matrix
49-
api/pandas.DataFrame.ix
50-
api/pandas.Index.asi8
51-
api/pandas.Index.data
52-
api/pandas.Index.flags
53-
api/pandas.Index.holds_integer
54-
api/pandas.Index.is_type_compatible
55-
api/pandas.Index.nlevels
56-
api/pandas.Index.sort
57-
api/pandas.Panel.agg
58-
api/pandas.Panel.aggregate
59-
api/pandas.Panel.blocks
60-
api/pandas.Panel.empty
61-
api/pandas.Panel.is_copy
62-
api/pandas.Panel.items
63-
api/pandas.Panel.ix
64-
api/pandas.Panel.major_axis
65-
api/pandas.Panel.minor_axis
66-
api/pandas.Series.asobject
67-
api/pandas.Series.blocks
68-
api/pandas.Series.from_array
69-
api/pandas.Series.ix
70-
api/pandas.Series.imag
71-
api/pandas.Series.real
47+
..
48+
.. toctree::
49+
50+
api/pandas.DataFrame.blocks
51+
api/pandas.DataFrame.as_matrix
52+
api/pandas.DataFrame.ix
53+
api/pandas.Index.asi8
54+
api/pandas.Index.data
55+
api/pandas.Index.flags
56+
api/pandas.Index.holds_integer
57+
api/pandas.Index.is_type_compatible
58+
api/pandas.Index.nlevels
59+
api/pandas.Index.sort
60+
api/pandas.Panel.agg
61+
api/pandas.Panel.aggregate
62+
api/pandas.Panel.blocks
63+
api/pandas.Panel.empty
64+
api/pandas.Panel.is_copy
65+
api/pandas.Panel.items
66+
api/pandas.Panel.ix
67+
api/pandas.Panel.major_axis
68+
api/pandas.Panel.minor_axis
69+
api/pandas.Series.asobject
70+
api/pandas.Series.blocks
71+
api/pandas.Series.from_array
72+
api/pandas.Series.ix
73+
api/pandas.Series.imag
74+
api/pandas.Series.real
7275

7376

7477
.. Can't convince sphinx to generate toctree for this class attribute.
7578
.. So we do it manually to avoid a warning
7679
77-
.. toctree::
78-
:hidden:
80+
..
81+
.. toctree::
7982
80-
api/pandas.api.extensions.ExtensionDtype.na_value
83+
api/pandas.api.extensions.ExtensionDtype.na_value

doc/source/reference/series.rst

+1
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ strings and apply several methods to it. These can be accessed like
409409
:template: autosummary/accessor_method.rst
410410

411411
Series.str.capitalize
412+
Series.str.casefold
412413
Series.str.cat
413414
Series.str.center
414415
Series.str.contains

doc/source/themes/nature_with_gtoc/layout.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
{%- block sidebar1 %}
2020
{%- block sidebartoc %}
2121
<h3>{{ _('Table Of Contents') }}</h3>
22-
{{ toctree() }}
22+
{{ toctree(includehidden=True) }}
2323
{%- endblock %}
2424
{%- block sidebarsearch %}
2525
<h3 style="margin-top: 1.5em;">{{ _('Search') }}</h3>
@@ -105,4 +105,4 @@ <h3 style="margin-top: 1.5em;">{{ _('Search') }}</h3>
105105
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
106106
})();
107107
</script>
108-
{% endblock %}
108+
{% endblock %}

doc/source/user_guide/index.rst

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ Users brand-new to pandas should start with :ref:`10min`.
1515
Further information on any specific method can be obtained in the
1616
:ref:`api`.
1717

18+
.. If you update this toctree, also update the manual toctree in the
19+
main index.rst.template
20+
1821
.. toctree::
1922
:maxdepth: 2
2023

0 commit comments

Comments
 (0)