emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-mode and python pandas


From: Rasmus
Subject: Re: [O] org-mode and python pandas
Date: Wed, 03 Jul 2013 12:31:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Hi Dov,

> Another related question is if there is any support for header tables?
> I.e. instead of this:
>
> |   |        A |        B |        C |
> | 0 | 0.827817 | 0.664009 | 0.089161 |
> | 1 | 0.170031 | 0.729214 | 0.110918 |
> | 2 | 0.575918 | 0.863924 | 0.757536 |
> | 3 | 0.682722 | 0.774445 | 0.992041 |
>
> I want this:
>
> |   |        A |        B |        C |
> |---+----------+----------+----------|
> | 0 | 0.827817 | 0.664009 | 0.089161 |
> | 1 | 0.170031 | 0.729214 | 0.110918 |
> | 2 | 0.575918 | 0.863924 | 0.757536 |
> | 3 | 0.682722 | 0.774445 | 0.992041 |

This is an issue in R as well, e.g. often I might want to have 
|A|
|-|
|1|
|2|
|-|
|3|

where the last is a summary statistic.  The last hline can be gotten
as 

#+BEGIN_SRC emacs-lisp :var X=mytabel :exports results
    (let
        ((L (- (length X) 1)))
      (append
       (subseq X 0 L)
       (list 'hline)
       (subseq X L)))
#+END_SRC

Perhaps a better way exists?

–Rasmus

-- 
. . . It begins of course with The Internet.  A Net of Peers.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]