diff --git a/doc/source/index.rst.template b/doc/source/index.rst.template index f18c61b5e2f95..b57ce83cfc33c 100644 --- a/doc/source/index.rst.template +++ b/doc/source/index.rst.template @@ -38,8 +38,7 @@ See the :ref:`overview` for more detail about what's in the library. :maxdepth: 3 :hidden: {% endif %} - - {% if not single_doc -%} +{% if not single_doc %} What's New in 0.25.0 install getting_started/index @@ -52,8 +51,7 @@ See the :ref:`overview` for more detail about what's in the library. {% if not single_doc -%} development/index whatsnew/index -{% endif -%} - +{% endif %} * :doc:`whatsnew/v0.25.0` * :doc:`install` diff --git a/doc/source/whatsnew/v0.17.1.rst b/doc/source/whatsnew/v0.17.1.rst index c4dc442bd7354..9de49699b9652 100644 --- a/doc/source/whatsnew/v0.17.1.rst +++ b/doc/source/whatsnew/v0.17.1.rst @@ -61,7 +61,7 @@ We can render the HTML to get the following table. :file: whatsnew_0171_html_table.html :class:`~pandas.core.style.Styler` interacts nicely with the Jupyter Notebook. -See the :ref:`documentation ` for more. +See the :ref:`documentation ` for more. .. _whatsnew_0171.enhancements: diff --git a/doc/source/whatsnew/v0.20.0.rst b/doc/source/whatsnew/v0.20.0.rst index 8e6ad07ec8435..51c8c488fb9d9 100644 --- a/doc/source/whatsnew/v0.20.0.rst +++ b/doc/source/whatsnew/v0.20.0.rst @@ -387,7 +387,7 @@ For example, after running the following, ``styled.xlsx`` renders as below: import os os.remove('styled.xlsx') -See the :ref:`Style documentation ` for more detail. +See the :ref:`Style documentation ` for more detail. .. _whatsnew_0200.enhancements.intervalindex: @@ -497,7 +497,7 @@ Other Enhancements - ``DataFrame.to_excel()`` has a new ``freeze_panes`` parameter to turn on Freeze Panes when exporting to Excel (:issue:`15160`) - ``pd.read_html()`` will parse multiple header rows, creating a MutliIndex header. (:issue:`13434`). - HTML table output skips ``colspan`` or ``rowspan`` attribute if equal to 1. (:issue:`15403`) -- :class:`pandas.io.formats.style.Styler` template now has blocks for easier extension, see the :ref:`example notebook ` (:issue:`15649`) +- :class:`pandas.io.formats.style.Styler` template now has blocks for easier extension, see the :ref:`example notebook ` (:issue:`15649`) - :meth:`Styler.render() ` now accepts ``**kwargs`` to allow user-defined variables in the template (:issue:`15649`) - Compatibility with Jupyter notebook 5.0; MultiIndex column labels are left-aligned and MultiIndex row-labels are top-aligned (:issue:`15379`) - ``TimedeltaIndex`` now has a custom date-tick formatter specifically designed for nanosecond level precision (:issue:`8711`) diff --git a/doc/source/whatsnew/v0.25.0.rst b/doc/source/whatsnew/v0.25.0.rst index 78d3d8fcb3d01..207d16afd350f 100644 --- a/doc/source/whatsnew/v0.25.0.rst +++ b/doc/source/whatsnew/v0.25.0.rst @@ -283,7 +283,7 @@ of ``object`` dtype. :attr:`Series.str` will now infer the dtype data *within* t s s.str.startswith(b'a') -.. _whatsnew_0250.api_breaking.incompatible_index_unions +.. _whatsnew_0250.api_breaking.incompatible_index_unions: Incompatible Index Type Unions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/pandas/core/indexes/base.py b/pandas/core/indexes/base.py index 5bf97f44edeed..9f0f89a0e34f5 100644 --- a/pandas/core/indexes/base.py +++ b/pandas/core/indexes/base.py @@ -1410,6 +1410,9 @@ def rename(self, name, inplace=False): @property def nlevels(self): + """ + Number of levels. + """ return 1 def _sort_levels_monotonic(self): @@ -1739,6 +1742,9 @@ def is_mixed(self): return self.inferred_type in ['mixed'] def holds_integer(self): + """ + Whether the type is an integer type. + """ return self.inferred_type in ['integer', 'mixed-integer'] @cache_readonly @@ -3965,6 +3971,9 @@ def _is_memory_usage_qualified(self): return self.is_object() def is_type_compatible(self, kind): + """ + Whether the index type is compatible with the provided type. + """ return kind == self.inferred_type _index_shared_docs['contains'] = """ @@ -4337,6 +4346,9 @@ def sort_values(self, return_indexer=False, ascending=True): return sorted_index def sort(self, *args, **kwargs): + """ + Use sort_values instead. + """ raise TypeError("cannot sort an Index object in-place, use " "sort_values instead")