Skip to content

BUG: option to avoid latex in qtconsole #12182 #12275

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

chris-b1
Copy link
Contributor

closes #12182

@jorisvandenbossche
Copy link
Member

Thanks!

@jorisvandenbossche jorisvandenbossche added Output-Formatting __repr__ of pandas objects, to_string IO LaTeX to_latex labels Feb 10, 2016
@jorisvandenbossche jorisvandenbossche added this to the 0.18.0 milestone Feb 10, 2016
df = pd.DataFrame({'a': [1, 2, 3]})
df._repr_latex_()
with pd.option_context('display.latex.repr', True):
print(df._repr_latex_())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am wondering a bit if this example is useful. As you would never use this kind of code like that, so maybe it is a possibly confusing (it will just show that it returns None)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I see what you're saying, it is contrived. I was just trying to think of some example - for some reason I always forget the options syntax. Maybe instead:

For example, if you have a jupyter notebook you plan to convert to latex using nbconvert, place the statement pd.set_option('display.latex.repr', True) in the first cell to have the contained DataFrame output also stored as latex.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think that is more useful

@chris-b1 chris-b1 force-pushed the repr-latex-option branch 2 times, most recently from bf4994d to b1421ec Compare February 10, 2016 02:26
@jreback
Copy link
Contributor

jreback commented Feb 10, 2016

thanks @chris-b1

cldy pushed a commit to cldy/pandas that referenced this pull request Feb 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO LaTeX to_latex Output-Formatting __repr__ of pandas objects, to_string
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: _repr_latex is called in jupyter qtconsole
3 participants