Task: Efficiently Read Last 'n' Rows of a CSV into a Pandas DataFrame
Task: Efficiently Read Last 'n' Rows of a CSV into a Pandas DataFrame: a task in Terminal-Lego-15k (Harbor dataset). Write a Python script that efficiently reads the last n rows of a CSV file into a Pandas DataFrame without loading the entire file into memory first (i.e., do not use the approach…
The task
Write a Python script that efficiently reads the last `n` rows of a CSV file into a Pandas DataFrame **without** loading the entire file into memory first (i.e., do not use the approach of reading the full CSV and then calling `df.tail()`).
Part of PrimeIntellect/Terminal-Lego-15k.