-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
to_html formatter not called for float values in a mixed-type column #13021
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
Comments
what exactly are you expecting here? |
I'm expecting it to call my format function for each value in the column. It doesn't seem to call the formatter at all. Obviously
when I'd expect $10 for the 3rd row. |
how so? show an expected result (with and w/o object columns) |
produces
instead of what I expected:
or am I missing something? (the 'xxx'.format in my example was just to illustrate that it doesn't call my function at all for the 10.4 value) |
If instead you create the data frame without the 'a' row, so the column type is float64, you get the expected result:
|
This is still an issue in 0.21.1 INSTALLED VERSIONScommit: None pandas: 0.21.1 |
@jobevers hence the open status |
Also having problems with formatters |
When column x has float64 type, the custom formatter is applied to every value
But when column x is mixed type, the formatter isn't called for (only) floating point values
output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.11.final.0
python-bits: 64
OS: Darwin
OS-release: 14.5.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.18.0
nose: None
pip: 1.5.4
setuptools: 20.7.0
Cython: None
numpy: 1.11.0
scipy: 0.17.0
statsmodels: None
xarray: None
IPython: 4.1.2
sphinx: None
patsy: None
dateutil: 2.4.2
pytz: 2016.3
blosc: None
bottleneck: None
tables: 3.2.2
numexpr: 2.5.2
matplotlib: 1.5.1
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: None
httplib2: None
apiclient: None
sqlalchemy: 1.0.12
pymysql: None
psycopg2: None
jinja2: None
boto: None
The text was updated successfully, but these errors were encountered: