Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to resolve some Dataframe method names #211

Open
V4G4X opened this issue Apr 13, 2023 · 2 comments
Open

Unable to resolve some Dataframe method names #211

V4G4X opened this issue Apr 13, 2023 · 2 comments

Comments

@V4G4X
Copy link

V4G4X commented Apr 13, 2023

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
Copy link
Author

V4G4X commented Apr 13, 2023

Mind you, the other methods are compiling in the other functions.

@amery
Copy link

amery commented Apr 17, 2023

You can only call exported methods, that is methods starting with a Capital letter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants