Skip to content
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

Writing to latex: omitting column with row index #1381

Closed
davidzentlermunro opened this issue Mar 9, 2018 · 4 comments
Closed

Writing to latex: omitting column with row index #1381

davidzentlermunro opened this issue Mar 9, 2018 · 4 comments

Comments

@davidzentlermunro
Copy link

Is it possible to write a dataframe to tex without including a column that just has the row numbers?

@nalimilan
Copy link
Member

I don't think so. I think the purpose of the show method for LaTeX is to provide a default representation of a DataFrame in LaTeX displays, but not to support any customization options (which could make the function very complex and would better be implemented in a separate package).

@bkamins bkamins mentioned this issue Jan 15, 2019
31 tasks
@korsbo
Copy link

korsbo commented Jan 21, 2019

This may be something Latexify.jl could be helpful for.

using DataFrames
using Latexify
df = DataFrame(A = 'x':'z', B = ["M", "F", "F"])
latexify(df; env=:table, latex=false)

outputs:

\begin{tabular}{cc}
A & B\\
x & M\\
y & F\\
z & F\\
\end{tabular}

I don't often use DataFrames myself, so I haven't spent much time on tweaking the interface between DataFrames and Latexify. But there is already some rudimentary support and it might be rather easy to improve it if anyone is interested.

@bkamins
Copy link
Member

bkamins commented Jul 25, 2019

Can this be closed?

@bkamins bkamins closed this as completed Jul 25, 2019
@bkamins bkamins reopened this Jul 25, 2019
@davidzentlermunro
Copy link
Author

Yes can be closed - I'm happily writing tables using both DataFrames package and write command.

@bkamins bkamins closed this as completed Jul 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants