I have a Pandas DataFrame that outputs correctly in the Python console, however I'm creating an application using QT designer and would like this DataFrame to be output on a QLabel, the label is called:
<widget class="QLabel" name="LBL_RESULT">.
Do I need to use another widget type to display the DataFrame?
The code I have is:
df=pd.DataFrame({"Identifier":id,"Description":desc})
print(df.to_string()) # prints everything to screen, not just the first page and last page.
df.to_csv('Test.txt',index=False) # saves the DataFrame to a text file
self.LBL_RESULT.setText(df)
The error is:
self.LBL_RESULT.setText(df)
TypeError: setText(self, str): argument 1 has unexpected type 'DataFrame'
Please can you assist. Thanks.