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),
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')
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
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
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,
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
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