Live data from Hacker News

Lesser-Known Python Data Analysis Libraries

jyotiska.github.io

21–30 of 69 posts

Re: Lesser-Known Python Data Analysis Libraries

#21

I hear a lot of talk about using python for data analysis. I gave up after trying to find a library to do cross tabs. Is there something to make custom tables in python other than prettytables?

What's wrong with using Pandas? http://pandas.pydata.org/pandas-docs/version/0.17.0/generate...

Re: Lesser-Known Python Data Analysis Libraries

#23
post #21

I hear a lot of talk about using python for data analysis. I gave up after trying to find a library to do cross tabs. Is there something to make custom tables in python other than prettytables?

What's wrong with using Pandas? http://pandas.pydata.org/pandas-docs/version/0.17.0/generate...

Perhaps I should have been more clear. I want to present the results in pdf or html. Like xtables, tables and stargazer packages in R.

Re: Lesser-Known Python Data Analysis Libraries

#24

My 2 cents: I would not recommend basing any new work on MRjob. As someone who inherited and has been maintaining a bunch of code that depends on it, the library seems to be barely maintained, support for VPC is only partial and not very well documented, the auditing tools stopped working quite a while ago and tracking the progress/status of EMR jobs is extremely painful (to be fair, this is more of an issue with Ela…

Do you know of any good alternatives? Any way to write MapReduces in python?

It's not quite the same (since it doesn't become a Map-Reduce job) but if you're mostly interested in the programming paradigm/scalability the Python API for Apache Spark might be a good alternative

Re: Lesser-Known Python Data Analysis Libraries

#25

Earlier quoted context omitted.

Do you know of any good alternatives? Any way to write MapReduces in python?

https://hadoop.apache.org/docs/r1.2.1/streaming.html

This is likely the best answer for those who wish to code within the map/reduce paradigm by hand and would prefer to use python.

Re: Lesser-Known Python Data Analysis Libraries

#27
post #9
post #4

Natsort is a lifesaver when working with filenames numbered by humans (like file1, file2 ... file11), those will be sorted correctly. Beats asking people to "Please add leading 0's oh and when you suspect you will pass 100, add 2 leading 0's."

FWIW, the sort method (and sorted keyword) take a 'key' keyword, where you can pass a function to use to calculate the key to sort the sequence with. So in your file11 case, you can do: sorted(files, key=lambda x: int(x[4:]) , and it will do the right thing. Although with natsort, you don't have to parse the actual strings yourself.

That is a neat trick, but it would be incredibly brittle. Kids, don't try this at home!

Re: Lesser-Known Python Data Analysis Libraries

#28
post #21

Earlier quoted context omitted.

What's wrong with using Pandas? http://pandas.pydata.org/pandas-docs/version/0.17.0/generate...

Perhaps I should have been more clear. I want to present the results in pdf or html. Like xtables, tables and stargazer packages in R.

I haven't used xtables or stargazer in a while, but ipython + pandas can display tables as html.

Here is an interesting ipython notebook with some examples:

http://nbviewer.jupyter.org/gist/chris1610/f2f4a2e9181f6ec22...

Re: Lesser-Known Python Data Analysis Libraries

#29

My 2 cents: I would not recommend basing any new work on MRjob. As someone who inherited and has been maintaining a bunch of code that depends on it, the library seems to be barely maintained, support for VPC is only partial and not very well documented, the auditing tools stopped working quite a while ago and tracking the progress/status of EMR jobs is extremely painful (to be fair, this is more of an issue with Ela…

Do you know of any good alternatives? Any way to write MapReduces in python?

Luigi does decent job. It is relatively easy to start with and powerful enough to do almost anything
Post reply on HN