Unable to resolve some Dataframe method names
V4G4X opened this issue · comments
V4G4X commented
I am using the Dataframe struct.
I was using some of it's methods and they were compiling. But a certain method colIndex
seems to be unresolvable.
Code:
func MapColumnNamesToIndex(df dataframe.DataFrame, columnNames []string) map[string]int {
colIndexMap := make(map[string]int)
for _, colName := range columnNames {
if index := df.colIndex(colName); index != -1 {
colIndexMap[colName] = index
}
}
return colIndexMap
}
Basically just creating a map from the column names to the indexes.
However I get the following error when compiling:
../../utils/tagUtils.go:66:18: df.colIndex undefined (type dataframe.DataFrame has no field or method colIndex)
I find this very weird, for now I have a workaround where I'm copy-pasting the implementation of colIndex,
But a better fix would be much preferred.
V4G4X commented
Mind you, the other methods are compiling in the other functions.
Alejandro Mery commented
You can only call exported methods, that is methods starting with a Capital letter