Skip to content

Commit 4bb4e40

Browse files
committed
DOC: extract null_counts_sub for frames only
1 parent dc999fe commit 4bb4e40

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

pandas/io/formats/info.py

+11-2
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@
5151
only if the DataFrame is smaller than
5252
``pandas.options.display.max_info_rows`` and
5353
``pandas.options.display.max_info_columns``. A value of True always
54-
shows the counts, and False never shows the counts.
54+
shows the counts, and False never shows the counts."""
55+
)
56+
57+
null_counts_sub = dedent(
58+
"""\
5559
null_counts : bool, optional
5660
.. deprecated:: 1.2.0
5761
Use show_counts instead."""
@@ -157,6 +161,7 @@
157161
"type_sub": " and columns",
158162
"max_cols_sub": frame_max_cols_sub,
159163
"show_counts_sub": show_counts_sub,
164+
"null_counts_sub": null_counts_sub,
160165
"examples_sub": frame_examples_sub,
161166
"see_also_sub": frame_see_also_sub,
162167
"version_added_sub": "",
@@ -237,6 +242,7 @@
237242
"type_sub": "",
238243
"max_cols_sub": "",
239244
"show_counts_sub": show_counts_sub,
245+
"null_counts_sub": "",
240246
"examples_sub": series_examples_sub,
241247
"see_also_sub": series_see_also_sub,
242248
"version_added_sub": "\n.. versionadded:: 1.4.0\n",
@@ -277,6 +283,7 @@
277283
memory introspection, a real memory usage calculation is performed
278284
at the cost of computational resources.
279285
{show_counts_sub}
286+
{null_counts_sub}
280287
281288
Returns
282289
-------
@@ -508,6 +515,7 @@ def memory_usage_bytes(self) -> int:
508515
type_sub=" and columns",
509516
max_cols_sub=frame_max_cols_sub,
510517
show_counts_sub=show_counts_sub,
518+
null_counts_sub=null_counts_sub,
511519
examples_sub=frame_examples_sub,
512520
see_also_sub=frame_see_also_sub,
513521
version_added_sub="",
@@ -548,9 +556,10 @@ def __init__(
548556
type_sub="",
549557
max_cols_sub="",
550558
show_counts_sub=show_counts_sub,
559+
null_counts_sub="",
551560
examples_sub=series_examples_sub,
552561
see_also_sub=series_see_also_sub,
553-
version_added_sub="\n.. versionadded:: 1.2.0\n",
562+
version_added_sub="\n.. versionadded:: 1.4.0\n",
554563
)
555564
def render(
556565
self,

0 commit comments

Comments
 (0)