Use double underscores..
In [10]: pandas.__version__
Out[10]: '0.13.1'
Which is just a shorthand for pandas.version.version
PEP8
suggests using __version__
as the global variable to store a version number. Most libraries follow this and then offer a more readable variable or possibly a function which outputs the version in a usable form (like Django for example).