mirror of
https://github.com/shizand/statapp.git
synced 2025-10-21 00:57:28 +03:00
23
statapp/models/correlation_analysis_model.py
Normal file
23
statapp/models/correlation_analysis_model.py
Normal file
@@ -0,0 +1,23 @@
|
||||
from PySide2.QtCore import QModelIndex, Qt
|
||||
|
||||
from statapp.models.ro_table_model import ROTableModel
|
||||
from statapp.models.utils import yx_header
|
||||
|
||||
|
||||
class CorrelationAnalysisModel(ROTableModel):
|
||||
def __init__(self, data):
|
||||
super().__init__(data)
|
||||
|
||||
def getHorizontalHeader(self):
|
||||
return yx_header(self.columnCount(QModelIndex()))
|
||||
|
||||
def getVerticalHeader(self):
|
||||
return yx_header(self.rowCount(QModelIndex()))
|
||||
|
||||
def data(self, index, role):
|
||||
if role == Qt.DisplayRole:
|
||||
if (index.column() <= index.row()):
|
||||
return float(self._data[index.row(), index.column()])
|
||||
else:
|
||||
None
|
||||
return None
|
Reference in New Issue
Block a user