Closed JovanVeljanoski closed 1 year ago
Looks like the right idea to me, but looks like it fails the unit tests when you give it a values of [1, 2]
Yeah I overlooked that case, i will handle it in the next iteration :). Thanks!
It should be fine now.. i've extended your idea @NickCrews to also be applied to lists.. if that is ever is needed. For example:
import vaex
length = 3
df = vaex.from_arrays(x=[1, 2, 3])
df['list_floats'] = vaex.vconstant(value=[1, 2, 3], length=length, dtype='float')
df['list_ints'] = vaex.vconstant(value=[1, 2, 3], length=length, dtype='int')
df['list_strings'] = vaex.vconstant(value=[1, 2, 3], length=length, dtype='str')
would do the equivalent thing, but now within the lists!
See discussion at https://github.com/vaexio/vaex/issues/2286 This is largely inspired by the proposal of @NickCrews in https://github.com/vaexio/vaex/issues/2286
Checklist: