From 318528ccc6d283b6e71bdfb62f9e4f4dbe43c07c Mon Sep 17 00:00:00 2001 From: Miro <200482516+Mirochill@users.noreply.github.com> Date: Mon, 25 May 2026 21:33:09 +0200 Subject: [PATCH] Cast column width length before range --- pandastable/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandastable/core.py b/pandastable/core.py index 7cfbf1b6..123521fc 100644 --- a/pandastable/core.py +++ b/pandastable/core.py @@ -809,7 +809,7 @@ def adjustColumnWidths(self, limit=30): else: w = self.cellwidth l = self.model.getlongestEntry(col) - txt = ''.join(['X' for i in range(l+1)]) + txt = ''.join(['X' for i in range(int(l)+1)]) tw,tl = util.getTextLength(txt, self.maxcellwidth, font=self.thefont) #print (col,txt,l,tw)