[Tutor] Python - Data Mining?

Kent Johnson kent37 at tds.net
Sun Jan 4 21:10:14 CET 2009


On Sun, Jan 4, 2009 at 1:25 PM, Nick Scholtes <airchia at gmail.com> wrote:
> Hi,
> I'm still very, very new to Python and programming. I was wondering if
> anyone can point me in the right direction.

Welcome!

> As I gradually learn Python, one of the things I want to be able to do is
> take a database, run queries and extract information and then graph that
> information visually to see patterns in the data. Where should I start?
> Does Python do this? If not, what language is used for this?

Yes, you can do this in Python.

Python has a standard for interfacing to databases called DB-API:
http://www.python.org/dev/peps/pep-0249/

You will have to obtain and install a DB-API module for the specific
database you want to query:
http://wiki.python.org/moin/DatabaseInterfaces

The docs for the individual modules tend to be sparse because they
follow the DB-API.

For graphing, there are several options:
http://wiki.python.org/moin/NumericAndScientific/Plotting

I recommend matplotlib.

You should probably start with a basic Python tutorial, though; both
DB-API and matplotlib will be difficult if you don't have a basic
understanding of Python. Pick a tutorial here:
http://wiki.python.org/moin/BeginnersGuide/NonProgrammers

Kent


More information about the Tutor mailing list