I have a csv with column headings. One column heading is “DATE”. If I want to generate two CSVs split into before DATE and after/including DATE is there a way to do this without procedurally looping? I have noticed most of the list functions are suited for filtering by row.
Share
I’ll assume you already have your data parsed into something like this:
Now we can use
splitAtandunzipto pull the list apart. Note that I’m assuming a lot about the data—in real code we’d want to check that the list is non-empty and that the header actually contains a"DATE"column.We can apply it to our test data:
This looks reasonable to me.