Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1.  Loading a ~200 column CSV file in Haskell into   a Record
      structure (Guru Devanla)


----------------------------------------------------------------------

Message: 1
Date: Sat, 30 Sep 2017 18:36:11 -0700
From: Guru Devanla <grd...@gmail.com>
To: beginners@haskell.org
Subject: [Haskell-beginners] Loading a ~200 column CSV file in Haskell
        into    a Record structure
Message-ID:
        <caoqgoxq_pw_ekeixgrouymaxojbozmxayucbq56rwgkees4...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hello All,

I am in the process of replicating some code in Python in Haskell.

In Python, I load a couple of csv files, each file having more than 100
columns into a Pandas' data frame. Panda's data-frame, in short is a
tabular structure which lets me performs on bunch of joins, and filter out
data. I generated different shapes of reports using these operations. Of
course, I would love some type checking to help me with these merge, join
operations as I create different reports.

I am not looking to replicate the Pandas data-frame functionality in
Haskell. First thing I want to do is reach out to the 'record' data
structure. Here are some ideas I have:

1.  I need to declare all these 100+ columns into multiple record
structures.
2.  Some of the columns can have NULL/NaN values. Therefore, some of the
attributes of the record structure would be 'MayBe' values. Now, I could
drop some columns during load and cut down the number of attributes i
created per record structure.
3.  Create a dictionary of each record structure which will help me index
into into them.'

I would like some feedback on the first 2 points. Seems like there is a lot
of boiler plate code I have to generate for creating 100s of record
attributes. Is this the only sane way to do this?  What other patterns
should I consider while solving such a problem.

Also, I do not want to add too many dependencies into the project, but open
to suggestions.

Any input/advice on this would be very helpful.

Thank you for the time!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.haskell.org/pipermail/beginners/attachments/20170930/59909db5/attachment-0001.html>

------------------------------

Subject: Digest Footer

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


------------------------------

End of Beginners Digest, Vol 112, Issue 1
*****************************************

Reply via email to