quantopian / qgrid

An interactive grid for sorting, filtering, and editing DataFrames in Jupyter notebooks
Apache License 2.0
3.04k stars 425 forks source link

If a a less then ( < ) is surrounded by two letters in data frame data, it causes cells to not appear properly in qGrid #357

Open JohnOmernik opened 3 years ago

JohnOmernik commented 3 years ago

Environment

Description of Issue

If a < is in your dataframe data and has no spaces after it, it breaks qgrid display.

Reproduction Steps

The following codes show foo in field1, and nothing in field2

import qgrid
import pandas as pd

mydf = pd.DataFrame({"field1": "foo<bar", "field2":"somethingelse"}, index=[0])
qgrid.show_grid(mydf)

The following code show foo< bar in field1 and somethingelse in field2 (as expected)

mydf = pd.DataFrame({"field1": "foo< bar", "field2":"somethingelse"}, index=[0])
qgrid.show_grid(mydf)

This appears to be something related to <, maybe qgrid thinks it's a tag of some sort (it's not, it's in the dataframe data..)