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.25k stars 590 forks source link

[BUG-REPORT] vaex.from_arrays(k=[]).k.value_counts() raises list index out of range exception #2193

Open Binger-cn opened 2 years ago

Binger-cn commented 2 years ago

vaex.from_arrays(k=[]).k.value_counts() error: ~/miniconda3/lib/python3.9/site-packages/vaex/cpu.py in reduce(self, others) 212 for other in [self, *others]: 213 counters.extend([k for k in other.counters if k is not None]) --> 214 counter = counters[0] 215 for other in counters[1:]: 216 counter.merge(other)

IndexError: list index out of range

Maybe it's better to return an empty dict ?

Name: vaex Version: 4.12.0 Summary: Out-of-Core DataFrames to visualize and explore big tabular datasets Home-page: https://www.github.com/vaexio/vaex Author: Maarten A. Breddels Author-email: maartenbreddels@gmail.com License: MIT Location: /home/support/miniconda3/lib/python3.9/site-packages Requires: vaex-astro, vaex-core, vaex-hdf5, vaex-jupyter, vaex-ml, vaex-server, vaex-viz Required-by: