Skip to content
Closed
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
5 changes: 3 additions & 2 deletions pandas/io/formats/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,8 @@ def headers(self) -> Sequence[str]:

def _gen_rows_without_counts(self) -> Iterator[Sequence[str]]:
"""Iterator with string representation of body data without counts."""
yield from self._gen_dtypes()
for dtype in self._gen_dtypes():
yield [dtype]

def _gen_rows_with_counts(self) -> Iterator[Sequence[str]]:
"""Iterator with string representation of body data with counts."""
Expand All @@ -1108,4 +1109,4 @@ def _get_dataframe_dtype_counts(df: DataFrame) -> Mapping[str, int]:
Create mapping between datatypes and their number of occurrences.
"""
# groupby dtype.name to collect e.g. Categorical columns
return df.dtypes.value_counts().groupby(lambda x: x.name).sum()
return df.dtypes.value_counts().groupby(lambda x: x.name).sum()
Loading