Separate indexing and reordering in Modin DataFrame (#1440)
Separate indexing and reordering in Modin DataFrame (#1440)

* Resolves #1395

In our internal Modin DataFrame, we previously used mask to
select rows/columns in the order they were given. The problem here is
that the mask functionality was creating potentially thousands of
partitions in an attempt to avoid communication. This killed performance
for all backends, and made operations like sample impossible.
Additionally, train_test_split from sklearn was impacted and not
usable.

To solve this, I separated the indexing and the reordering into two
separate APIs in the internal DataFrame. This gives us flexibility, but
does not impact performance on the already fast and well supported
indexing of values that are sorted. The result is improved performance
for the case where the mask call was also intended to reorder the
columns or rows. Further optimization for the reorder_labels API will
be needed in the future, but because this is separated from the mask,
it will be easier to optimize individually.

Signed-off-by: 2b388a7d7b4158329ce930fa4a0fed034ec10270@gmail.com
modin-project/modin,modin-project/modin