Can I get the current column index from the datasource method:
-tableView:objectValueForTableColumn:row:
You can use the loc and iloc functions to access columns in a Pandas DataFrame. Let's see how. If we wanted to access a certain column in our DataFrame, for example the Grades column, we could simply use the loc function and specify the name of the column in order to retrieve it.
You can search for the given NSTableColumn in the NSTableView columns...
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex {
NSUInteger index = [[aTableView tableColumns] indexOfObject:aTableColumn];
...
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With