Hi Karthikeyan, You have implemented a function called "categorize" in your code. It's functionality is same as *one hot encoding* which is implemented in sklearn library.
Link to docs: http://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.OneHotEncoder.html Example implementation: https://machinelearningmastery.com/how-to-one-hot-encode-sequence-data-in-python/ I hope this helps you. Regards Kumaran Rajendhiran On Thu, Jul 12, 2018 at 9:33 PM <chennaipy-requ...@python.org> wrote: > Send Chennaipy mailing list submissions to > chennaipy@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/chennaipy > or, via email, send a message with subject or body 'help' to > chennaipy-requ...@python.org > > You can reach the person managing the list at > chennaipy-ow...@python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Chennaipy digest..." > > > Today's Topics: > > 1. A data frame processor library (Karthikeyan A K) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 12 Jul 2018 19:56:45 +0530 > From: Karthikeyan A K <77mi...@gmail.com> > To: Bangalore Python Users Group - India <bangpyp...@python.org>, > Chennai Python User Group Mailing List <chennaipy@python.org>, > il...@freelists.org, tpil...@freelists.org > Subject: [Chennaipy] A data frame processor library > Message-ID: > < > cajr+9kbp8bkvf1qf1wswaggd4gara6hhcdxura_ekzrfidb...@mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hello All, > > In datascience I am doing the same work again and again, so grouping common > functions as a library called Frame Processor. Check this out > https://gitlab.com/mindaslab/FrameProcessor > > If you know something, better than this, please reply. If some one does > same thing in a repeated way and need a function for that, then please feel > to mail back or contribute. > > -- > Karthikeyan A K > > Founder of Code Tribe https://is.gd/codetribe > Author of https://mindaslab.github.io/I-Love-Ruby/ > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mail.python.org/pipermail/chennaipy/attachments/20180712/6eadcdb7/attachment-0001.html > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Chennaipy mailing list > Chennaipy@python.org > https://mail.python.org/mailman/listinfo/chennaipy > > > ------------------------------ > > End of Chennaipy Digest, Vol 59, Issue 5 > **************************************** >
_______________________________________________ Chennaipy mailing list Chennaipy@python.org https://mail.python.org/mailman/listinfo/chennaipy