mlr --csv tac data.csv

Category: Data Science & Analysis

mlr --csv tac data.csv

Reverse the row order of a CSV

The tac verb prints records in reverse order, last row first, which is useful for time series where the newest entries sit at the bottom. It is the record-aware counterpart of the tac command for plain text. Headers are preserved and printed once at the top. Use head after tac to see the last few rows in original order.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.