Skip to content

Commit 90b1c5d

Browse files
DOC: make doc build run with string dtype enabled (#61864)
1 parent d5eab1b commit 90b1c5d

File tree

4 files changed

+41
-14
lines changed

4 files changed

+41
-14
lines changed

.github/workflows/docbuild-and-upload.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ jobs:
5757
run: python web/pandas_web.py web/pandas --target-path=web/build
5858

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

6462
- name: Build the interactive terminal

doc/source/user_guide/basics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ arguments. The special value ``all`` can also be used:
590590

591591
.. ipython:: python
592592
593-
frame.describe(include=["object"])
593+
frame.describe(include=["str"])
594594
frame.describe(include=["number"])
595595
frame.describe(include="all")
596596

doc/source/whatsnew/v0.13.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ API changes
184184
.. ipython:: python
185185
:okwarning:
186186
187-
dfc.loc[0]['A'] = 1111
187+
dfc.loc[0]['B'] = 1111
188188
189189
::
190190

@@ -198,7 +198,7 @@ API changes
198198

199199
.. ipython:: python
200200
201-
dfc.loc[0, 'A'] = 11
201+
dfc.loc[0, 'B'] = 1111
202202
dfc
203203
204204
- ``Panel.reindex`` has the following call signature ``Panel.reindex(items=None, major_axis=None, minor_axis=None, **kwargs)``

doc/source/whatsnew/v0.15.0.rst

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,20 +1025,49 @@ Other:
10251025
- :func:`describe` on mixed-types DataFrames is more flexible. Type-based column filtering is now possible via the ``include``/``exclude`` arguments.
10261026
See the :ref:`docs <basics.describe>` (:issue:`8164`).
10271027

1028-
.. ipython:: python
1028+
.. code-block:: python
10291029
1030-
df = pd.DataFrame({'catA': ['foo', 'foo', 'bar'] * 8,
1031-
'catB': ['a', 'b', 'c', 'd'] * 6,
1032-
'numC': np.arange(24),
1033-
'numD': np.arange(24.) + .5})
1034-
df.describe(include=["object"])
1035-
df.describe(include=["number", "object"], exclude=["float"])
1030+
>>> df = pd.DataFrame({'catA': ['foo', 'foo', 'bar'] * 8,
1031+
... 'catB': ['a', 'b', 'c', 'd'] * 6,
1032+
... 'numC': np.arange(24),
1033+
... 'numD': np.arange(24.) + .5})
1034+
>>> df.describe(include=["object"])
1035+
catA catB
1036+
count 24 24
1037+
unique 2 4
1038+
top foo a
1039+
freq 16 6
1040+
>>> df.describe(include=["number", "object"], exclude=["float"])
1041+
catA catB numC
1042+
count 24 24 24.000000
1043+
unique 2 4 NaN
1044+
top foo a NaN
1045+
freq 16 6 NaN
1046+
mean NaN NaN 11.500000
1047+
std NaN NaN 7.071068
1048+
min NaN NaN 0.000000
1049+
25% NaN NaN 5.750000
1050+
50% NaN NaN 11.500000
1051+
75% NaN NaN 17.250000
1052+
max NaN NaN 23.000000
10361053
10371054
Requesting all columns is possible with the shorthand 'all'
10381055

1039-
.. ipython:: python
1056+
.. code-block:: python
10401057
1041-
df.describe(include='all')
1058+
>>> df.describe(include='all')
1059+
catA catB numC numD
1060+
count 24 24 24.000000 24.000000
1061+
unique 2 4 NaN NaN
1062+
top foo a NaN NaN
1063+
freq 16 6 NaN NaN
1064+
mean NaN NaN 11.500000 12.000000
1065+
std NaN NaN 7.071068 7.071068
1066+
min NaN NaN 0.000000 0.500000
1067+
25% NaN NaN 5.750000 6.250000
1068+
50% NaN NaN 11.500000 12.000000
1069+
75% NaN NaN 17.250000 17.750000
1070+
max NaN NaN 23.000000 23.500000
10421071
10431072
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>`
10441073

0 commit comments

Comments
 (0)