From: Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: How to access tables headers from within code block?
Date: Tue, 18 Nov 2014 13:05:46 +0100 [thread overview]
Message-ID: <86d28kaf39.fsf@example.com> (raw)
In-Reply-To: 546B1FA2.9080307@hilboll.de
Andreas Hilboll wrote:
> I have a table like this
>
> #+TBLNAME: t_tracers
> | Trace gas | SCIATRAN alias |
> |-----------+----------------|
> | O3 | O3 |
> | NO2 | NO2 |
> | HCHO | HCHO |
> | CHOCHO | NO3 |
> | HONO | OCLO |
> | BRO | BRO |
> | H2O | H2O |
> | O4 | O4 |
>
> and want to access the data from within a Python code block:
>
> #+BEGIN_SRC python :var tracers_raw=t_tracers
> return (tracers_raw)
> #+END_SRC
>
> My problem is that the table headers are apparently not passed to
> Python, as my results look like this:
>
> #+RESULTS:
> | O3 | O3 |
> | NO2 | NO2 |
> | HCHO | HCHO |
> | CHOCHO | NO3 |
> | HONO | OCLO |
> | BRO | BRO |
> | H2O | H2O |
> | O4 | O4 |
>
> How can I access the table headers also from within the code block?
I don't have Python, but ":colnames yes" should make it.
Best regards,
Seb
--
Sebastien Vauban
prev parent reply other threads:[~2014-11-18 12:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-18 10:29 How to access tables headers from within code block? Andreas Hilboll
2014-11-18 12:05 ` Sebastien Vauban [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86d28kaf39.fsf@example.com \
--to=sva-news-d0wtavr13harg/idocfnwg@public.gmane.org \
--cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.