def get_rows_with_cluster(self, cluster: Point): if self.is_teacher: raise Exception('Unsupported Operation') table = pd.read_csv(self.path, sep=',') table = table[table.cluster == cluster.to_str()] table = table.to_dict(orient='records') for i in range(len(table)): row = table[i] table[i] = TableRow(row.get('path'), Point(row.get('feature').split(' ')), Point(row.get('cluster').split(' '))) return table