Repository: modin-project/modin

Issue:
Modin Pandas concat with axis=1 does not work
### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Ubuntu 18.04.4 LTS
- **Modin version** (`modin.__version__`): 0.7.4
- **Python version**: 3.8.0


### Describe the problem
When I try to concatenate several Modin Pandas DataFrames of equal number of rows column-wise, I get either `KeyError: 'Passing list-likes to .loc or [] with any missing labels is no longer supported, see https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#deprecate-loc-reindex-listlike'` (when `ignore_index=False`), or `ValueError: Length mismatch:` (with `ignore_index=True`).

### Source code / logs
```
import numpy as np
import modin.pandas as modin_pd
modin_pd.concat([modin_pd.Series(np.ones(10)), modin_pd.Series(np.ones(10))], axis=1, ignore_index=True)
```



Discussion:
Hi @pashkov-v thanks for the report!

I can reproduce this with the code you provided on current master branch. It looks like a metadata issue at the API layer because `_to_pandas` on the result produces a correct result.

```python
import numpy as np
import modin.pandas as modin_pd
modin_pd.concat([modin_pd.Series(np.ones(10)), modin_pd.Series(np.ones(10))], axis=1, ignore_index=True)._to_pandas()
```


Resolving patch:
diff --git a/modin/backends/pandas/query_compiler.py b/modin/backends/pandas/query_compiler.py
--- a/modin/backends/pandas/query_compiler.py
+++ b/modin/backends/pandas/query_compiler.py
@@ -252,11 +252,14 @@ def concat(self, axis, other, **kwargs):
         ignore_index = kwargs.get("ignore_index", False)
         other_modin_frame = [o._modin_frame for o in other]
         new_modin_frame = self._modin_frame._concat(axis, other_modin_frame, join, sort)
+        result = self.__constructor__(new_modin_frame)
         if ignore_index:
-            new_modin_frame.index = pandas.RangeIndex(
-                len(self.index) + sum(len(o.index) for o in other)
-            )
-        return self.__constructor__(new_modin_frame)
+            if axis == 0:
+                return result.reset_index(drop=True)
+            else:
+                result.columns = pandas.RangeIndex(len(result.columns))
+                return result
+        return result
 
     # END Append/Concat/Join
 
diff --git a/modin/engines/base/frame/data.py b/modin/engines/base/frame/data.py
--- a/modin/engines/base/frame/data.py
+++ b/modin/engines/base/frame/data.py
@@ -489,7 +489,7 @@ def mask(
                 new_col_widths = [len(idx) for _, idx in col_partitions_list.items()]
                 new_columns = self.columns[sorted(col_numeric_idx)]
                 if self._dtypes is not None:
-                    new_dtypes = self.dtypes[sorted(col_numeric_idx)]
+                    new_dtypes = self.dtypes.iloc[sorted(col_numeric_idx)]
                 else:
                     new_dtypes = None
         else:


Test patch:
diff --git a/modin/pandas/test/test_concat.py b/modin/pandas/test/test_concat.py
--- a/modin/pandas/test/test_concat.py
+++ b/modin/pandas/test/test_concat.py
@@ -83,6 +83,17 @@ def test_concat_on_column():
         pandas.concat([df, df2], axis="columns"),
     )
 
+    modin_result = pd.concat(
+        [pd.Series(np.ones(10)), pd.Series(np.ones(10))], axis=1, ignore_index=True
+    )
+    pandas_result = pandas.concat(
+        [pandas.Series(np.ones(10)), pandas.Series(np.ones(10))],
+        axis=1,
+        ignore_index=True,
+    )
+    df_equals(modin_result, pandas_result)
+    assert modin_result.dtypes.equals(pandas_result.dtypes)
+
 
 def test_invalid_axis_errors():
     df, df2 = generate_dfs()