Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 1
    share your sample input and expected output set Commented Feb 11, 2015 at 5:01
  • In a CSV a row can span multiple lines because (quoted) cells can have newlines. grep is not going to deal with that correctly. If you are dealing with some restricted subset data without newlines, describe that exactly (and don't call it CSV) Commented Feb 11, 2015 at 5:44
  • You should not use "spread evenly" rows for a sample. That makes your sample vulnerable to repeated patterns (eg, you may pull the same time each day). Pre-generate 10 random numbers with the range [1, num_rows] and then select those records. Throw an error if any row numbers are the same, as then the population is too small. Commented Feb 11, 2015 at 12:12