Task: Read Random Lines from a Large CSV File
Task: Read Random Lines from a Large CSV File: a task in Terminal-Lego-15k (Harbor dataset). Write a Python script that efficiently reads a specified number of random lines from a large CSV file without loading the entire file into memory . The solution must work for very large files (multiple…
The task
Write a Python script that efficiently reads a specified number of random lines from a large CSV file **without loading the entire file into memory**. The solution must work for very large files (multiple gigabytes) and return the requested number of randomly sampled lines.
Part of PrimeIntellect/Terminal-Lego-15k.