Re: [O] getting an hline in a python generated table

2015-04-03 Thread Ken Mankoff
Sorry about that. I switched out of Org mode in my email client so C-c C-c sent the email instead of executing the code block. I was mid-sentence... #+BEGIN_SRC python :results table :exports results from tabulate import tabulate import pandas as pd df = pd.DataFrame(np.random.rand(2,2),

Re: [O] getting an hline in a python generated table

2015-04-03 Thread Ken Mankoff
I've been using the following to generate hline in Org Python blocks: #+BEGIN_SRC python :results table :exports results from tabulate import tabulate import pandas as pd df = pd.DataFrame(np.random.rand(2,2), index=['foo','bar']) tab = tabulate(df, ['col1','col2'], tablefmt='orgtbl')

Re: [O] getting an hline in a python generated table

2015-04-03 Thread John Kitchin
cool, thanks for the tip. I was not awware of that library. Ken Mankoff writes: Sorry about that. I switched out of Org mode in my email client so C-c C-c sent the email instead of executing the code block. I was mid-sentence... #+BEGIN_SRC python :results table :exports results :session

Re: [O] getting an hline in a python generated table

2015-04-03 Thread William Henney
A simpler solution is to just use None, which gets automatically converted to an hline by org-babel: #+BEGIN_SRC python :return mytable NROWS, NCOLS = 6, 4 mytable = [] mytable.append(['A', 'B', 'C', 'D']) # Table header mytable.append(None) # hline for irow in

Re: [O] getting an hline in a python generated table

2015-04-03 Thread John Kitchin
wow, that is some wizardry there! I did not know you could do a return value that way! or get an hline from None! thanks! William Henney writes: A simpler solution is to just use None, which gets automatically converted to an hline by org-babel: #+BEGIN_SRC python :return mytable NROWS,

[O] getting an hline in a python generated table

2015-04-01 Thread John Kitchin
Hi everyone, In emacs-lisp, I can get a table as output that has a horizontal line in it like this: (append '((name scopus-id h-index n-docs n-citations)) '(hline) (some expression that generates a list)) The first row is header names, then a horizontal line, followed by a row

Re: [O] getting an hline in a python generated table

2015-04-01 Thread Rasmus
Hi John, John Kitchin jkitc...@andrew.cmu.edu writes: In emacs-lisp, I can get a table as output that has a horizontal line in it like this: (append '((name scopus-id h-index n-docs n-citations)) '(hline) (some expression that generates a list)) The first row is header