-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
44 lines (34 loc) · 1.07 KB
/
main.py
File metadata and controls
44 lines (34 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import sys
from PyQt5 import QtWidgets, uic
import pandas as pd
from mainWindow import Ui_DataAnalyzer
from Dataframe import Dataframe
# if __name__ == "__main__":
# import sys
# app = QtWidgets.QApplication(sys.argv)
# DataAnalyzer = QtWidgets.QMainWindow()
# ui = Ui_DataAnalyzer()
# ui.setupUi(DataAnalyzer)
# #Dataframe viewing
# df = pd.read_csv('jm1.csv')
# dfViewer = Dataframe(df, ui)
# dfViewer.show()
# DataAnalyzer.show()
# sys.exit(app.exec_())
class Ui(QtWidgets.QMainWindow):
def __init__(self):
super(Ui, self).__init__()
uic.loadUi('main.ui', self)
self.dfView = self.findChild(QtWidgets.QTableView, 'tableView') # Find the button
def printButtonPressed(self):
# This is executed when the button is pressed
print('printButtonPressed')
def initializeDataframe(self, model):
self.dfView.setModel(model)
app = QtWidgets.QApplication(sys.argv)
window = Ui()
#Dataframe viewing
df = pd.read_csv('test.csv')
dataframe = Dataframe(df, window)
dataframe.show()
app.exec_()