Skip to content
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

[BUG-REPORT]sort string column failed #1208

Closed
quicksina opened this issue Feb 4, 2021 · 1 comment · Fixed by #1963
Closed

[BUG-REPORT]sort string column failed #1208

quicksina opened this issue Feb 4, 2021 · 1 comment · Fixed by #1963

Comments

@quicksina
Copy link

quicksina commented Feb 4, 2021

Thank you for reaching out and helping us improve Vaex!

Description
I loaded the csv file. if the column of string type included none value, i sort accoding this column that it would show wrong below.

df

Out[72]:

   Class                     Address       Number
0    --                      'NY'            1
1   'Sporting Goods'         --              2
2   'Hand Tools'           'Tokyo'           3
3        --                'Shanghai'       nan
4    'Wood Products'       'London'          4
5    'Hardware'              --              6
6    'Paint Supplies'        --              5

df.sort(df.Class)

Traceback (most recent call last):

File "/Users/heyuqi/opt/anaconda3/envs/vaex4/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3418, in run_code exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
df.sort(df.Class)
File "/Users/heyuqi/development/vaex/install/vaex/packages/vaex-core/vaex/dataframe.py", line 4123, in sort indices = np.argsort(values, kind=kind)
File "<array_function internals>", line 5, in argsort
File "/Users/heyuqi/opt/anaconda3/envs/vaex4/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 1107, in argsort return _wrapfunc(a, 'argsort', axis=axis, kind=kind, order=order)
File "/Users/heyuqi/opt/anaconda3/envs/vaex4/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 55, in _wrapfunc return _wrapit(obj, method, *args, **kwds)
File "/Users/heyuqi/opt/anaconda3/envs/vaex4/lib/python3.8/site-packages/numpy/core/fromnumeric.py", line 44, in _wrapit result = getattr(asarray(obj), method)(*args, **kwds)
TypeError: '<' not supported between instances of 'str' and 'NoneType'

Software information

  • Vaex version (import vaex; vaex.__version__):
  • {'vaex': '4.0.0a13',
    'vaex-core': '4.0.0a19',
    'vaex-viz': '0.5.0.dev1',
    'vaex-hdf5': '0.7.0a6',
    'vaex-server': '0.4.0a3',
    'vaex-astro': '0.8.0a1',
    'vaex-ui': '0.3.0',
    'vaex-jupyter': '0.6.0.dev1',
    'vaex-ml': '0.11.0a5',
    'vaex-graphql': '0.2.0.dev1'}
  • Vaex was installed via: from source
  • OS: MacOS Big Sur
@quicksina quicksina reopened this Feb 5, 2021
@quicksina quicksina changed the title [BUG-REPORT] [BUG-REPORT]sort string column failed Feb 5, 2021
@JovanVeljanoski
Copy link
Member

Hi,

Thanks for the report. This is indeed a missing feature. I will make a test now let's see how easy it is to get this in.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants