0

I have a simple app that uses Pandas and PyQT6 to transform an Excel file into a format that's useful for me.

It works the way I want to, but I'd like to add like a label that'd say "Loading..." whenever the file is loading because read_excel takes a few minutes to do that and I want to indicate that the app isn't stuck, it's just processing.

Whenever I try to do something like below, the label doesn't change at all because the app just gets straight to the read_excel function and freezes until the file is loaded. Does anyone know how to properly do it? Thanks!

                self.status_label.setText("Loading...")
                pbireport = pd.read_excel(fname[0])
Bartek
  • 3
  • 1
  • I think you are referring to this https://stackoverflow.com/questions/52209290/how-do-i-make-a-progress-bar-for-loading-pandas-dataframe-from-a-large-xlsx-file – Usama Aleem Dec 09 '22 at 14:50
  • @UsamaAleem no, I don't really want a progress bar, just wanna change the label to say "loading". As far as I know you cant make a progress bar when the file is .xlsx – Bartek Dec 09 '22 at 14:51

1 Answers1

0

This is because pd.read_excel(fname[0]) function runs in the main thread. You must use QThread