Load the iris dataset and store the data in a numpy array.
(self)
| 107 | self.setCentralWidget(container) |
| 108 | |
| 109 | def loadCSVFile(self): |
| 110 | """Load the iris dataset and store the data in a numpy array.""" |
| 111 | file_name = "files/iris.csv" |
| 112 | |
| 113 | with open(file_name, "r") as csv_f: |
| 114 | reader = csv.reader(csv_f) |
| 115 | header_labels = next(reader) |
| 116 | data = np.array(list(reader)) |
| 117 | return data |
| 118 | |
| 119 | if __name__ == '__main__': |
| 120 | app = QApplication(sys.argv) |