0

I am working on a python app that would gather data from multiple servers and show it in a table via pandastable module. I am in early stages, so the code is a bit messy and rough. I am able to render the table, but i have a problem with header row and id column. I dont see any options to define the size, and i noticed that it was much smaller in my first attempts. Now after several changes it got too big and i dont know why. I hid the data rows, those are fine. The CSV file looks like this: 123456,0,1,,abcdeef,full,abcdef,abcd,0000000993,24000000,34124

I am using tabbed frames, hence the name of the parent frame in the code example.

Current state

Code bit responsible for the table:

cols = ["BackupID", "Job Type", "Job state", "Status Code", "Policy", "Schedule", "Client name", "Media Server", "Duration", "Kilobytes", "Transfer speed"]
table = Table(tab[selected_tab], showtoolbar=False, showstatusbar=True)
table.importCSV(filepath, names=cols)
table.show()

EDIT: I changed square brackets for regular brackets in 'cols' and now its almost alright. There is still some empty space ,tho. Anyone knows how to further alter the width and height but only for the ID and headers?

enter image description here

Thanks

boz noz
  • 25
  • 5

1 Answers1

0

This is old. Probably the original poster has abandoned his project or fixed it himself. Nevertheless, I am going to respond here instead of creating a new post.

I had a very similar problem. This thread was the only one about this topic that I could find. And it was no help ;)

Eventually I tried commenting out bits and pieces of code to see what triggers this. I put the pandastable table in a parent frame, as we should. I had in the code

frame.grid(row=1,column=0)
frame.grid.columnconfigure(0,
weight=1)

Which I forgot to remove from when I tried something else. The weight setting is what caused the issue with me. Removing it made my table look pretty.

Perhaps this post helps someone to NOT waste a lot of time on a similar problem.

W_vH
  • 11
  • 1