Skip to content

Commit f6e33a0

Browse files
datapythonistajorisvandenbossche
authored andcommitted
DOC: Fixing even more warnings (not many left) (#26850)
1 parent 7ecfa8e commit f6e33a0

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

doc/source/index.rst.template

+2-4
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ See the :ref:`overview` for more detail about what's in the library.
3838
:maxdepth: 3
3939
:hidden:
4040
{% endif %}
41-
42-
{% if not single_doc -%}
41+
{% if not single_doc %}
4342
What's New in 0.25.0 <whatsnew/v0.25.0>
4443
install
4544
getting_started/index
@@ -52,8 +51,7 @@ See the :ref:`overview` for more detail about what's in the library.
5251
{% if not single_doc -%}
5352
development/index
5453
whatsnew/index
55-
{% endif -%}
56-
54+
{% endif %}
5755

5856
* :doc:`whatsnew/v0.25.0`
5957
* :doc:`install`

doc/source/whatsnew/v0.17.1.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ We can render the HTML to get the following table.
6161
:file: whatsnew_0171_html_table.html
6262

6363
:class:`~pandas.core.style.Styler` interacts nicely with the Jupyter Notebook.
64-
See the :ref:`documentation </style.ipynb>` for more.
64+
See the :ref:`documentation </user_guide/style.ipynb>` for more.
6565

6666
.. _whatsnew_0171.enhancements:
6767

doc/source/whatsnew/v0.20.0.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ For example, after running the following, ``styled.xlsx`` renders as below:
387387
import os
388388
os.remove('styled.xlsx')
389389
390-
See the :ref:`Style documentation </style.ipynb#Export-to-Excel>` for more detail.
390+
See the :ref:`Style documentation </user_guide/style.ipynb#Export-to-Excel>` for more detail.
391391

392392
.. _whatsnew_0200.enhancements.intervalindex:
393393

@@ -497,7 +497,7 @@ Other Enhancements
497497
- ``DataFrame.to_excel()`` has a new ``freeze_panes`` parameter to turn on Freeze Panes when exporting to Excel (:issue:`15160`)
498498
- ``pd.read_html()`` will parse multiple header rows, creating a MutliIndex header. (:issue:`13434`).
499499
- HTML table output skips ``colspan`` or ``rowspan`` attribute if equal to 1. (:issue:`15403`)
500-
- :class:`pandas.io.formats.style.Styler` template now has blocks for easier extension, see the :ref:`example notebook </style.ipynb#Subclassing>` (:issue:`15649`)
500+
- :class:`pandas.io.formats.style.Styler` template now has blocks for easier extension, see the :ref:`example notebook </user_guide/style.ipynb#Subclassing>` (:issue:`15649`)
501501
- :meth:`Styler.render() <pandas.io.formats.style.Styler.render>` now accepts ``**kwargs`` to allow user-defined variables in the template (:issue:`15649`)
502502
- Compatibility with Jupyter notebook 5.0; MultiIndex column labels are left-aligned and MultiIndex row-labels are top-aligned (:issue:`15379`)
503503
- ``TimedeltaIndex`` now has a custom date-tick formatter specifically designed for nanosecond level precision (:issue:`8711`)

doc/source/whatsnew/v0.25.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ of ``object`` dtype. :attr:`Series.str` will now infer the dtype data *within* t
283283
s
284284
s.str.startswith(b'a')
285285
286-
.. _whatsnew_0250.api_breaking.incompatible_index_unions
286+
.. _whatsnew_0250.api_breaking.incompatible_index_unions:
287287

288288
Incompatible Index Type Unions
289289
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

pandas/core/indexes/base.py

+12
Original file line numberDiff line numberDiff line change
@@ -1410,6 +1410,9 @@ def rename(self, name, inplace=False):
14101410

14111411
@property
14121412
def nlevels(self):
1413+
"""
1414+
Number of levels.
1415+
"""
14131416
return 1
14141417

14151418
def _sort_levels_monotonic(self):
@@ -1739,6 +1742,9 @@ def is_mixed(self):
17391742
return self.inferred_type in ['mixed']
17401743

17411744
def holds_integer(self):
1745+
"""
1746+
Whether the type is an integer type.
1747+
"""
17421748
return self.inferred_type in ['integer', 'mixed-integer']
17431749

17441750
@cache_readonly
@@ -3965,6 +3971,9 @@ def _is_memory_usage_qualified(self):
39653971
return self.is_object()
39663972

39673973
def is_type_compatible(self, kind):
3974+
"""
3975+
Whether the index type is compatible with the provided type.
3976+
"""
39683977
return kind == self.inferred_type
39693978

39703979
_index_shared_docs['contains'] = """
@@ -4337,6 +4346,9 @@ def sort_values(self, return_indexer=False, ascending=True):
43374346
return sorted_index
43384347

43394348
def sort(self, *args, **kwargs):
4349+
"""
4350+
Use sort_values instead.
4351+
"""
43404352
raise TypeError("cannot sort an Index object in-place, use "
43414353
"sort_values instead")
43424354

0 commit comments

Comments
 (0)