vaexio / vaex

Out-of-Core hybrid Apache Arrow/NumPy DataFrame for Python, ML, visualization and exploration of big tabular data at a billion rows per second 🚀
https://vaex.io
MIT License
8.28k stars 590 forks source link

[BUG-REPORT] String comparison failed with `pyarrow.StringScalar` type #2242

Open cgjosephlee opened 1 year ago

cgjosephlee commented 1 year ago

Description

text = ['Something', 'very pretty', 'is coming', 'our', 'way.']
df = vx.from_arrays(text=text)
df[df.text == text[0]] # good
df[df.text == text[1]] # good

col = df.text.values
df[df.text == col[0]] # NameError: name 'Something' is not defined
df[df.text == col[1]] # SyntaxError: invalid syntax
df[df.text == col[1].as_py()] # good

Same syntax works with numbers.

num = [1,2,3,4,5]
df = vx.from_arrays(num=num)
df[df.num == df.num.values[1]] # good

Software information

Additional information Please state any supplementary information or provide additional context for the problem (e.g. screenshots, data, etc..).

JovanVeljanoski commented 1 year ago

Thanks for the report!