class MainWindow(QMainWindow):
def __init__(self, parent=None):
...
def simrank(self):
self._mutex.lock()
df = pd.DataFrame({'Name': name, 'Title': title, 'Score': score}, columns=['Name', 'Title', 'Score'])
user_df = pd.DataFrame({'Name': user_name, 'Title': user_title, 'Score': user_score}, columns=['Name', 'Title', 'Score'])
#self._mutex.lock()
final_df = df.append(user_df, ignore_index=True)
#self._mutex.unlock()
final_dfpt = final_df.pivot_table(index='Name', columns='Title', values='Score', aggfunc='first').fillna(0) # index 0 = name, index 1 = title, index 2 = score
len_index = len(final_dfpt.index)
user_index = finduser_index(final_dfpt, len_index)
temp = dict()
for item in range(0, len_index-1):
temp[item] = com_title(final_df, final_dfpt, item, user_index)
rank_temp = sorted(temp.items(), key=operator.itemgetter(1), reverse=True) # tuple
self.rank_temp = rank_temp
class resultWindow(QWidget): ####결과창
def __init__(self, rank_temp, parent=None): #, most_name, most_rank
super(resultWindow, self).__init__(parent)
self.namelbl = QLabel(self)
self.simlbl = QLabel(self)
layout = QVBoxLayout()
self.setLayout(layout)
self.rank_temp = rank_temp
print(self.rank_temp)
layout.addWidget(self.namelbl, 0)
layout.addWidget(self.simlbl, 1)
rank_temp 가져와서 레이블에 넣고 싶은데 저렇게 해서 프린트찍어보면 클래스랑 주소값만줌ㅠ
아맞다 파이썬 pyqt5임
해당 댓글은 삭제되었습니다.
왜애앵
오키
해당 댓글은 삭제되었습니다.
자원클래스를 하나 따로 만들어두라는것?