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

Docs should reflect changed indexcols and datacols behavior when filenamecol is active #245

Open
MaximilianJHuber opened this issue Dec 28, 2018 · 4 comments

Comments

@MaximilianJHuber
Copy link

MaximilianJHuber commented Dec 28, 2018

If I loadtable with filenamecol = :source_file this creates a new first column.

Then indexcols and datacols need to be shifted by one index, which is a bit impractical. So, I suggest that the filenamecol should be the appended as the last column of the resulting table.

@joshday
Copy link
Collaborator

joshday commented Dec 28, 2018

That seems like a good change to me.

@shashi
Copy link
Collaborator

shashi commented Dec 31, 2018

First column in an ndsparse is the longest "stride". That's why I thought it made sense...

@joshday
Copy link
Collaborator

joshday commented Jan 2, 2019

The filenamecol is typically the first index column, but in practice I often try loading one file before loading multiple. Since filenamecol shifts all the column numbers, it messes up the arguments I had previously set for indexcols and datacols.

When you start with this:

loadtable(one_file; indexcols = (1,2), datacols = (3,4,5))

Loading multiple files becomes:

# proposed change
loadtable(many_files; indexcols = (6,1,2), datacols = (3,4,5), filenamecol = :File)

# current behavior
loadtable(many_files; indexcols = (1,2,3), datacols = (4,5,6), filenamecol = :File)

I think I prefer the proposed change, but at worst the current behavior is only a slight inconvenience.

@MaximilianJHuber
Copy link
Author

The behavior is still unchanged, so I guess the matter is decided. I think the docs should mention this quirk!

@MaximilianJHuber MaximilianJHuber changed the title loadtable filenamecol behavior is odd Docs should reflect changed indexcols and datacols behavior when filenamecol is active Jun 27, 2019
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

3 participants