Open trankmichael opened 6 years ago
Thanks for the report...this seems to be working as expected for me, unless I'm missing something. I tested on both python 2 and 3. For both, I see the following:
Sorry, it works when '柏林市'
is a string but fails with u'柏林市'
. I've updated the reproduction steps to:
import qgrid
x = pd.DataFrame({'alias': u'柏林市'}, index=[0])
display(x)
qg = qgrid.show_grid(tmp, grid_options={'editable': False})
Thanks. This is fixed in the latest beta (1.0.6b6) which you can install from pypi with pip install qgrid --pre
. I'll close this issue once the beta is officially released and available on conda-forge.
Environment
Operating System:
Python Version: 2.7.6
How did you install Qgrid: pip
Python packages:
qgrid==1.0.5, jupyterlab==0.32.1, notebook==5.3.1
Jupyter lab packages (if applicable):
jupyterlab-manager v0.35.0, qgrid v1.0.5
Description of Issue
What did you expect to happen? I expected to view the DataFrame similar to
__repr_html__
.What happened instead? An error from
qgrid.grid._update_df
when it calls.map(str)
'ascii' codec can't encode characters in position 16-18: ordinal not in range(128)
Reproduction Steps
What steps have you taken to resolve this already?
I tried setting
'editable' : False
hoping that that would not call_update_df
.