Skip to content

DOC: make doc build run with string dtype enabled #61864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/docbuild-and-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ jobs:
run: python web/pandas_web.py web/pandas --target-path=web/build

- name: Build documentation
# TEMP don't let errors fail the build until all string dtype changes are fixed
continue-on-error: true
run: doc/make.py --warnings-are-errors

- name: Build the interactive terminal
Expand Down
2 changes: 1 addition & 1 deletion doc/source/user_guide/basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ arguments. The special value ``all`` can also be used:

.. ipython:: python
frame.describe(include=["object"])
frame.describe(include=["str"])
frame.describe(include=["number"])
frame.describe(include="all")
Expand Down
4 changes: 2 additions & 2 deletions doc/source/whatsnew/v0.13.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ API changes
.. ipython:: python
:okwarning:
dfc.loc[0]['A'] = 1111
dfc.loc[0]['B'] = 1111
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The B column are already integers, so this example of chained assignment is still valid this way, but then doesn't include dtype changes

::

Expand All @@ -198,7 +198,7 @@ API changes

.. ipython:: python
dfc.loc[0, 'A'] = 11
dfc.loc[0, 'B'] = 1111
dfc
- ``Panel.reindex`` has the following call signature ``Panel.reindex(items=None, major_axis=None, minor_axis=None, **kwargs)``
Expand Down
47 changes: 38 additions & 9 deletions doc/source/whatsnew/v0.15.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1025,20 +1025,49 @@ Other:
- :func:`describe` on mixed-types DataFrames is more flexible. Type-based column filtering is now possible via the ``include``/``exclude`` arguments.
See the :ref:`docs <basics.describe>` (:issue:`8164`).

.. ipython:: python
.. code-block:: python

df = pd.DataFrame({'catA': ['foo', 'foo', 'bar'] * 8,
'catB': ['a', 'b', 'c', 'd'] * 6,
'numC': np.arange(24),
'numD': np.arange(24.) + .5})
df.describe(include=["object"])
df.describe(include=["number", "object"], exclude=["float"])
>>> df = pd.DataFrame({'catA': ['foo', 'foo', 'bar'] * 8,
... 'catB': ['a', 'b', 'c', 'd'] * 6,
... 'numC': np.arange(24),
... 'numD': np.arange(24.) + .5})
>>> df.describe(include=["object"])
catA catB
count 24 24
unique 2 4
top foo a
freq 16 6
>>> df.describe(include=["number", "object"], exclude=["float"])
catA catB numC
count 24 24 24.000000
unique 2 4 NaN
top foo a NaN
freq 16 6 NaN
mean NaN NaN 11.500000
std NaN NaN 7.071068
min NaN NaN 0.000000
25% NaN NaN 5.750000
50% NaN NaN 11.500000
75% NaN NaN 17.250000
max NaN NaN 23.000000

Requesting all columns is possible with the shorthand 'all'

.. ipython:: python
.. code-block:: python

df.describe(include='all')
>>> df.describe(include='all')
catA catB numC numD
count 24 24 24.000000 24.000000
unique 2 4 NaN NaN
top foo a NaN NaN
freq 16 6 NaN NaN
mean NaN NaN 11.500000 12.000000
std NaN NaN 7.071068 7.071068
min NaN NaN 0.000000 0.500000
25% NaN NaN 5.750000 6.250000
50% NaN NaN 11.500000 12.000000
75% NaN NaN 17.250000 17.750000
max NaN NaN 23.000000 23.500000

Without those arguments, ``describe`` will behave as before, including only numerical columns or, if none are, only categorical columns. See also the :ref:`docs <basics.describe>`

Expand Down
Loading