Skip to content

Commit 0d6787b

Browse files
authored
CLN: minor change in StringFormatter (#52346)
1 parent 91c2cb5 commit 0d6787b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/io/formats/string.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def _fit_strcols_to_terminal_width(self, strcols: list[list[str]]) -> str:
166166
dif = max_len - width
167167
# '+ 1' to avoid too wide repr (GH PR #17023)
168168
adj_dif = dif + 1
169-
col_lens = Series([Series(ele).apply(len).max() for ele in strcols])
169+
col_lens = Series([Series(ele).str.len().max() for ele in strcols])
170170
n_cols = len(col_lens)
171171
counter = 0
172172
while adj_dif > 0 and n_cols > 1:

0 commit comments

Comments
 (0)