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

range should accept negative indexes #11

Open
rossjones opened this issue May 8, 2013 · 1 comment
Open

range should accept negative indexes #11

rossjones opened this issue May 8, 2013 · 1 comment

Comments

@rossjones
Copy link
Contributor

THe range in delete current accepts a comma-separated list, but doesn't work with negative indexes. This would be really handy for clearing junk at the end of a file, see:

http://static.london.gov.uk/gla/expenditure/docs/2012-13-P12-250.csv

Would expect the following URL to remove the first 5 lines, and the last 4 lines of the CSV.

http://datapipes.okfnlabs.org/csv/delete?range=0:6,-4:&url=http://static.london.gov.uk/gla/expenditure/docs/2012-13-P12-250.csv&
@andylolz
Copy link
Collaborator

Good plan.

Referencing from the end of the file is a very similar problem to tail, and can also be solved using fixed queues.

There’s actually an extra, very nice feature request in the second example i.e. implied 'first' or 'last' row/column by omitting one of the range limits.

andylolz added a commit that referenced this issue Nov 24, 2013
Refs #11. This is required to keep the syntax relatively simple.
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