Skip to content

Commit

Permalink
Doc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
batterseapower committed Sep 10, 2019
1 parent 0a95a67 commit e2d2666
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions doc/source/user_guide/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -783,10 +783,12 @@ values **not** in the categories, similarly to how you can reindex **any** panda

.. ipython:: python
df2.iloc[[0]].reindex(['a', 'e'])
df2.iloc[[0]].reindex(['a', 'e']).index
df2.iloc[[0]].reindex(pd.Categorical(['a', 'e'], categories=list('abe')))
df2.iloc[[0]].reindex(pd.Categorical(['a', 'e'], categories=list('abe'))).index
df3 = pd.DataFrame({'A': np.arange(3), 'B': pd.Series(list('abc')).astype('category')})
df3 = df3.set_index('B')
df3.reindex(['a', 'e'])
df3.reindex(['a', 'e']).index
df3.reindex(pd.Categorical(['a', 'e'], categories=list('abe')))
df3.reindex(pd.Categorical(['a', 'e'], categories=list('abe'))).index
.. warning::

Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v1.0.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Categorical
^^^^^^^^^^^

- Added test to assert the :func:`fillna` raises the correct ValueError message when the value isn't a value from categories (:issue:`13628`)
- For :class:`CategoricalIndex`, `DataFrame.reindex` would fail when the targets contained duplicates, and wouldn't fail if the source contained duplicates (:issue:`28107`)
- For :class:`CategoricalIndex`, :meth:`DataFrame.reindex` with a :class:`CategoricalIndex`, would fail when the targets contained duplicates, and wouldn't fail if the source contained duplicates (:issue:`28107`)
-


Expand Down

0 comments on commit e2d2666

Please sign in to comment.