Pulling the data out of each csv row as a map would eliminate nth. That is a good idea, and I'll add it to my tool bag.
On Friday, May 18, 2012 11:37:12 AM UTC-4, Alex Robbins wrote: > > I wonder if the idea was that you are better off using a hash-map and > key lookups so the positions are labeled. Some csv libs return a seq > of maps where the keys are the column header values. That way you'd be > able to select data by name instead of a sometimes arbitrary position. > > Just a guess. > Alex > > On Fri, May 18, 2012 at 10:05 AM, David Nolen <[email protected]> > wrote: > > There's nothing wrong with using nth far as I know. > > > > > > On Fri, May 18, 2012 at 11:03 AM, octopusgrabbus < > [email protected]> > > wrote: > >> > >> In our production development environment, we perform a lot of data > >> transfers between diverse systems, and most of those transfers involve > >> comma-delimited (.csv) data. So my first small Clojure applications > have > >> revolved around the clojure-csv library. > >> > >> While learning Clojure I have seen the comment that using nth "stinks", > >> because it creates dependencies. Wanting to do things in a Clojure way, > I > >> have a question. > >> > >> If I need to extract a number of columns of a spreadsheet to minimize > the > >> dataset and this happens as the application is reading in and > initializing > >> its data, what should I use to extract those columns other than nth? > And, if > >> I use a series first and rest, isn't that also positional? > >> > >> I've thought of ways to re-position the data initially, so comparison > >> columns between two different spreadsheets that have one unique key > column > >> in common would be accessible with first, for example. However, I would > >> still need to get at that data by column in order to reposition it, > hence > >> the need for nth. > >> > >> > >> -- > >> You received this message because you are subscribed to the Google > >> Groups "Clojure" group. > >> To post to this group, send email to [email protected] > >> Note that posts from new members are moderated - please be patient with > >> your first post. > >> To unsubscribe from this group, send email to > >> [email protected] > >> For more options, visit this group at > >> http://groups.google.com/group/clojure?hl=en > > > > > > -- > > You received this message because you are subscribed to the Google > > Groups "Clojure" group. > > To post to this group, send email to [email protected] > > Note that posts from new members are moderated - please be patient with > your > > first post. > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > > http://groups.google.com/group/clojure?hl=en > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to [email protected] Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/clojure?hl=en
