Skip to content

Can't skip header and utilize map-fn  #48

@ctyler9

Description

@ctyler9
(defun load-event-data (data-path)
  (let ((data (cl-csv:read-csv data-path 
							   :skip-first-p t
                               :map-fn (lambda (row)
                                         (make-instance 'PRC
                                                        :security "ADA"
                                                        :timestamp (nth 2 row)
                                                        :price (nth 3 row)
                                                        :lastvolume (nth 7 row))))))
    (format t "Total objects created: ~A~%" (length data))
    data))

there seems to be a bug when trying to create objects through :map-fn... the header/first row isn't skipped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions