Skip to content

DataFrame to_latex does not present or pass through column_format to formatter #9402

Closed
@andrewbolster

Description

@andrewbolster

Expected Behaviour

column_format keyword arguments to df.to_latex should honour the relevant options available and implemented in DataFrameFormatter and it's to_latex method

The reason why this is annoying is that default frmt behaviour is to justify based on the column datatype. For cases where the index column/first column is numeric, these columns get right-aligned, which looks horrible.

Versions

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.6.final.0
python-bits: 64
OS: Linux
OS-release: 3.13.0-27-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_GB.UTF-8

pandas: 0.15.1
nose: 1.3.4
Cython: 0.20.2
numpy: 1.9.1
scipy: 0.14.0
statsmodels: 0.5.0
IPython: 2.3.1
sphinx: 1.2.2
patsy: 0.3.0
dateutil: 2.3
pytz: 2014.10
bottleneck: None
tables: 3.1.1
numexpr: 2.4
matplotlib: 1.4.2
openpyxl: 1.8.6
xlrd: None
xlwt: 0.7.5
xlsxwriter: None
lxml: 3.3.5
bs4: 4.3.2
html5lib: None
httplib2: 0.9
apiclient: None
rpy2: None
sqlalchemy: None
pymysql: None
psycopg2: None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions