def __getitem__(self, item): """ Makes sure GCData keeps its properties after [] operations are used Returns ------- GCData Data with [] operations applied """ out = APtable.__getitem__(self, item) return out
def __getitem__(self, item): """ Makes sure GCData keeps its properties after [] operations are used. It also makes all letter casings accepted Returns ------- GCData Data with [] operations applied """ if isinstance(item, str): name_dict = {n.lower(): n for n in self.colnames} item = item.lower() item = ','.join([name_dict[i] for i in item.split(',')]) out = APtable.__getitem__(self, item) return out