Skip to content

Commit 81e87bc

Browse files
committed
Merge branch 'master' into fix-25557
# Conflicts: # doc/source/whatsnew/v0.24.2.rst
2 parents 87d1636 + 21769e9 commit 81e87bc

Some content is hidden

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

61 files changed

+1050
-511
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, SS05, PR03, PR04, PR05, PR10, EX04, RT04, RT05, SA05)' ; echo $MSG
245-
$BASE_DIR/scripts/validate_docstrings.py --format=azure --errors=GL06,GL07,GL09,SS04,SS05,PR03,PR04,PR05,PR10,EX04,RT04,RT05,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/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/dsintro.rst

-44
Original file line numberDiff line numberDiff line change
@@ -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/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

doc/source/user_guide/io.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1689,7 +1689,7 @@ The ``Series`` and ``DataFrame`` objects have an instance method ``to_csv`` whic
16891689
allows storing the contents of the object as a comma-separated-values file. The
16901690
function takes a number of arguments. Only the first is required.
16911691

1692-
* ``path_or_buf``: A string path to the file to write or a StringIO
1692+
* ``path_or_buf``: A string path to the file to write or a file object. If a file object it must be opened with `newline=''`
16931693
* ``sep`` : Field delimiter for the output file (default ",")
16941694
* ``na_rep``: A string representation of a missing value (default '')
16951695
* ``float_format``: Format string for floating point numbers
@@ -1702,7 +1702,7 @@ function takes a number of arguments. Only the first is required.
17021702
* ``mode`` : Python write mode, default 'w'
17031703
* ``encoding``: a string representing the encoding to use if the contents are
17041704
non-ASCII, for Python versions prior to 3
1705-
* ``line_terminator``: Character sequence denoting line end (default '\\n')
1705+
* ``line_terminator``: Character sequence denoting line end (default `os.linesep`)
17061706
* ``quoting``: Set quoting rules as in csv module (default csv.QUOTE_MINIMAL). Note that if you have set a `float_format` then floats are converted to strings and csv.QUOTE_NONNUMERIC will treat them as non-numeric
17071707
* ``quotechar``: Character used to quote fields (default '"')
17081708
* ``doublequote``: Control quoting of ``quotechar`` in fields (default True)

doc/source/whatsnew/index.rst

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Version 0.24
1616
.. toctree::
1717
:maxdepth: 2
1818

19+
v0.24.2
20+
v0.24.1
1921
v0.24.0
2022

2123
Version 0.23

0 commit comments

Comments
 (0)