### Bug description

- **Setup:** I use `.ipynb` documents in VS Code and quarto cli (v. 1.3.242) on Windows 10 to render the report to HTML.
- **Issue:** I want to render Pandas tables with table captions. The column alignment is different when the index is included and excluded.
- **Expected behaviour:** the same defaults despite the fact that the index is included or excluded.
- **Details.**

HTML output:

![image](https://user-images.githubusercontent.com/12725868/222958433-2e15f7e3-bc45-443e-bd14-3cfa45f6604d.png)

The result in VS code – column alignment is the same in each case.

![image](https://user-images.githubusercontent.com/12725868/222958301-dd86564d-f36d-41cd-88a5-40079f75871f.png)


Code:

```python
import pandas as pd
df = pd.DataFrame({
    'Country': {0: 'Belgium',  1: 'England'},
    'League': {0: 'Belgium Jupiler League',  1: 'England Premier League'}
})

#| label: tbl-1
#| tbl-cap: This column name alignment is expected. 
df.style.hide(axis="index")

#| label: tbl-2
#| tbl-cap: Why are column labels aligned differently in this table compared 
#           to in the previous example?
df
```



File: `ipynb` file and rendered HTML output are attached
[quarto_col_alignmet_bug.zip](https://github.com/quarto-dev/quarto-cli/files/10891707/quarto_col_alignmet_bug.zip)



**Update**
This might be related to `.style` accessor/attribute.

```
#| label: tbl-3
#| tbl-cap: It seams that `.style` changes the output.
df.style
```

- If this issue is not related to Quarto, can more examples of Quarto with Pandas and ipynb files be added?

### Checklist

- [X] 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.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) 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?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
rich-iannone
2023-03-05T11:29:23Z
GegznaV
enhancement tables
v1.4
open
Default column alignment varies for Pandas dataframes and tables with captions
https://github.com/quarto-dev/quarto-cli/issues/4627