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

csvlook: Add max rows option #409

Closed

Conversation

MichaelAquilina
Copy link

I found myself needing an option to truncate to the top n rows often while working with CSV files. Example usage:

csvlook --truncate 5 < example.csv

The head command is not particularly suited got this because of the fact that you need to consider the first 3 lines are part of the header. While you could just stay manually adding 3 to your head argument each time I thought it would make more sense to just provide the option from within csvlook.

@jpmckinney
Copy link
Member

Just noting to myself that agate has a max_rows option, which can be used to implement the same functionality as in this PR once #515 is closed.

@jpmckinney jpmckinney modified the milestone: Quick Feb 5, 2016
@jpmckinney jpmckinney changed the title Add truncate option to csvlook csvlook: Add truncate option Feb 9, 2016
@jpmckinney jpmckinney changed the title csvlook: Add truncate option csvlook: Add max rows option Feb 9, 2016
@jpmckinney
Copy link
Member

@onyxfish Before implementing (not via this PR), are you good with adding this option to csvlook?

@jpmckinney jpmckinney modified the milestone: Quick Feb 9, 2016
@MichaelAquilina
Copy link
Author

Just saw this feature was merged in with the option --max-rows so will close this PR

lcorbasson pushed a commit to lcorbasson/csvkit that referenced this pull request Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants