Note my Emacs is a custom build with native compilation, json and GTK support - which may be an issue - i.e. taken straight from the latest code in github.
If I execute the code in the editor the org-mode table appears in the results. If I export to html or pdf I get the error: org-babel-insert-result: Wrong type argument: markerp, nil.
Even a simple example such as the following fails to export but will show inline.
#+begin_src python :results table :exports both
return [['A', 1], ['B', 2]]
#+end_src
Stack trace on failure is below - hence why I was concerned with the custom Emacs build:
jit-lock--run-functions(248 324)
jit-lock-fontify-now(248 #<marker at 324 in
test-case.org<2>>)
org-font-lock-ensure(248 #<marker at 324 in
test-case.org<2>>)
org-table-align()
org-table-next-field()
funcall-interactively(org-table-next-field)
#<subr call-interactively>(org-table-next-field nil nil)
call-interactively@ido-cr+-record-current-command(#<subr call-interactively> org-table-next-field nil nil)
apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (org-table-next-field nil nil))
call-interactively(org-table-next-field nil nil)
org-cycle()
org-babel-insert-result("| | A | B |\n|----+-----+-----|\n| 0 | 1 |..." ("raw" "value" "replace") ("python" "import pandas as pd\nfrom tabulate import tabulate\n..." ((:colname-names) (:rowname-names) (:result-params "raw" "value" "replace") (:result-type . value) (:results . "raw value replace") (:exports . "both") (:cache . "no") (:hlines . "no") (:noweb . "no") (:session . "none") (:tangle . "no")) "" nil 11 "(ref:%s)") nil "python")
org-babel-execute-src-block(nil ("python" "import pandas as pd\nfrom tabulate import tabulate\n..." ((:colname-names) (:rowname-names) (:result-params "replace" "value" "raw") (:result-type . value) (:results . "replace value raw") (:exports . "both") (:tangle . "no") (:session . "none") (:noweb . "no") (:hlines . "no") (:cache . "no")) "" nil 11 "(ref:%s)"))
org-babel-exp-results(("python" "import pandas as pd\nfrom tabulate import tabulate\n..." ((:cache . "no") (:colname-names) (:exports . "both") (:hlines . "no") (:noweb . "no") (:result-params "replace" "value" "raw") (:result-type . value) (:results . "replace value raw") (:rowname-names) (:session . "none") (:tangle . "no")) "" nil 11 "(ref:%s)") block nil "8ef5c3d71f4f16777939d1b561458e5435a5e4a4")
org-babel-exp-do-export(("python" "import pandas as pd\nfrom tabulate import tabulate\n..." ((:cache . "no") (:colname-names) (:exports . "both") (:hlines . "no") (:noweb . "no") (:result-params "replace" "value" "raw") (:result-type . value) (:results . "replace value raw") (:rowname-names) (:session . "none") (:tangle . "no")) "" nil 11 "(ref:%s)") block "8ef5c3d71f4f16777939d1b561458e5435a5e4a4")
org-babel-exp-src-block()
org-babel-exp-process-buffer()
org-export-as(html nil nil nil (:output-file "test-case.html"))
org-export-to-file(html "test-case.html" nil nil nil nil nil)
org-html-export-to-html(nil nil nil nil)
org-export-dispatch(nil)
funcall-interactively(org-export-dispatch nil)
#<subr call-interactively>(org-export-dispatch nil nil)
call-interactively@ido-cr+-record-current-command(#<subr call-interactively> org-export-dispatch nil nil)
apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (org-export-dispatch nil nil))
call-interactively(org-export-dispatch nil nil)
command-execute(org-export-dispatch)