quarto-dev / quarto-dev/quarto-cli

coexistence of R and Python gives me inconsistent table renderings

Open
#3,457 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement tables upstream
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

Hi,
I have really strange table rendering problems.

My code is the one below. If I render it, the python ouput table is printed as plain text

image

If I change {r} in {{r}}, and render again the file, I have the correct rendering of the python ouput table

image

It seems to me that something does not work properly, but it seems to me that the code has no errors.

I'm using quarto 1.3.21, in debian 11 (inside WSL2).

Thank you

---
title: "tables test"
format: html
---

```{python}
import pandas as pd

df = pd.read_csv("input.csv")
df
```


```{r}
library(tidyverse)
data <- read_csv('input.csv')
knitr::kable(data)
```
year,i,v
2016,F,0.9599716561118586
2016,G,0.0382418519682473
2016,C,0.0012657864805693667
2016,W,1.2161279236855405e-05
2016,S,4.5402109150926846e-05
Checklist
  • Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
  • Please format your issue so it is easier for us to read the bug report.
  • Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • Please document the operating system you're running. If on Linux, please provide the specific distribution.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the complete reproducible .qmd example using Quarto 1.3.21, Debian 11, and WSL2, and render it in HTML. Compare the output when the R chunk uses {r} versus {{r}}; done means the Python dataframe is rendered as a table consistently in both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, r
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.