Lines & ListsLesson 369Free preview
Truncate a List
This lesson is part of Web Developer Tools · All levels
Summary
Truncate a List limits the number of rows that are displayed or saved, for example only the first 10 rows or the last 5 rows. This tool is useful for previewing, sampling, or displaying short log. Since the out-of-bounds line is removed from the result, make sure the complete data is kept in the original source.
Key points
- Truncate limits the number of lines according to the selected limit
- The starting mode maintains the first line, the ending mode maintains the last line
- CSV header should be maintained when cutting data
- The line beyond the boundary does not go into the output, but remains in the original file
- Avoid truncate when all data is to be imported or analyzed
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.