gregsexton / gregsexton/ob-ipython

pandas dataframe output header is not aligned to column

Open
#171 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
742
Forks
107
PR merge metrics
No merged PRs in 30d

Description

This is due to ob-ipython removing all leading whitespaces. for example, the output looks like
```
Name Age Year Cmp Att Yds TD
0 Peyton Manning 38 1998 326 575 3739 26
1 Peyton Manning 38 1999 331 533 4135 26
2 Peyton Manning 38 2000 357 571 4413 33
3 Peyton Manning 38 2001 343 547 4131 26
4 Peyton Manning 38 2002 392 591 4200 27
```
when it should be
```
Name Age Year Cmp Att Yds TD
0 Peyton Manning 38 1998 326 575 3739 26
1 Peyton Manning 38 1999 331 533 4135 26
2 Peyton Manning 38 2000 357 571 4413 33
3 Peyton Manning 38 2001 343 547 4131 26
4 Peyton Manning 38 2002 392 591 4200 27
```
this can be fixed by replacing the
`(-map 's-trim)`
in ob-ipython--render with
`(-map 's-trim-right)`
so that leading whitespaces are kept.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.