[IPython-User] Ipython and Pandas - print tables in html style

Michael Hadmack hadmack@gmail....
Fri Mar 30 15:53:57 CDT 2012


On a similar note, are there any plans for IPython to support Markdown
tables?  Tables are not strict Markdown but are frequently
implemented, see:
http://www.leancrew.com/all-this/2008/08/tables-for-markdown-and-textmate/

For example:

| Left align | Right align | Center align |
|:-----------|------------:|:------------:|
| This       |        This |     This     |
| column     |      column |    column    |
| will       |        will |     will     |
| be         |          be |      be      |
| left       |       right |    center    |
| aligned    |     aligned |   aligned    |

This would be a very useful notebook feature since HTML tables are
very cumbersome to type.  And a conversion mechanism from numpy
matrices to tables would be great too.  Seems that pandas has
something like this? But I don't use it, only straight numpy.

-Mike

On Fri, Mar 30, 2012 at 9:28 AM, Massimo Di Stefano
<massimodisasha@gmail.com> wrote:
>
>
> Hi All,
>
> i'm running the same 'notebook instructions' on 2 different linux machine (debian sid python2.7 / ubuntu lucid python 2.6)
> when i try to print a pandas data frame inside the Ipython notebook ,  one machine (debian) print me the data as text e.g. :
>
> 'climate is a pandas data frame'
>
> In [4]:
>
> climate.describe()
>
> Out[4]:
>
>               AMO         NAO        NIN
> count  153.000000  148.000000  30.000000
> mean    -0.003686    0.148581  -0.000000
> std      0.178397    1.940747   1.000000
> min     -0.415583   -4.890000  -1.689705
> 25%     -0.137000   -1.047500  -0.900031
> 50%      0.012500    0.235000   0.191878
> 75%      0.119750    1.540000   0.599686
> max      0.449333    5.080000   1.945570
>
> (exactly the same output if i do :  print climate.describe() )
>
>
> While the other machine is able to render the results as a nice html table when i type :
>
> climate.describe()
>
> and print the text version when i type : print climate.describe()
>
> i was wandering what changes between the 2 linux box .. i'm using the same git version for both pandas and python on both machine
> so maybe is something related to some settings or a different version of the ipytho/pandas dependencies ?
>
> what do you think ?
>
> thanks for any help!
>
> --Massimo.
>
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>


More information about the IPython-User mailing list