The attached patch adds ob-python value results handling for the following types of results: - Dictionaries - Numpy arrays - Pandas dataframes - Matplotlib figures This is a bigger commit than I'm used to, so I thought I better send it out before merging, in case someone notices obvious problems I missed. Overview of changes: Dictionaries are now transformed into alists before being converted to lisp. Previously, they had been getting mangled, like so: #+begin_src python return {"a": 1, "b": 2} #+end_src #+RESULTS: | a | : | 1 | b | : | 2 | But now they appear like so: #+begin_src python return {"a": 1, "b": 2} #+end_src #+RESULTS: | a | 1 | | b | 2 | Numpy arrays and pandas dataframes are also converted to tables automatically now. Tables converted from Pandas dataframes have row and column names. To avoid conversion, you can specify "raw", "verbatim", "scalar", or "output" in the ":results" header argument. For plotting, you can specify "graphics" in the ":results" header. You'll also need to provide a ":file" argument. The behavior depends on whether using output or value results. For output results, the current figure (pyplot.gcf) is cleared before evaluating, then the result saved. For value results, the block is expected to return a matplotlib Figure, which is saved. To set the figure size, do it from within Python. Here is an example of how to plot: #+begin_src python :results output graphics file :file boxplot.svg import matplotlib.pyplot as plt import seaborn as sns plt.figure(figsize=(5, 5)) tips = sns.load_dataset("tips") sns.boxplot(x="day", y="tip", data=tips) #+end_src