Repository: modin-project/modin

Issue:
When read_csv is called on a json file modin rises an exception
### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**:

Ubuntu 19.10

- **Modin version** (`modin.__version__`):

0.7.2+66.g272ac5d.dirty

- **Python version**:

Python 3.7.5

- **Code we can use to reproduce**:

```python
df1 = pd.read_csv("categories.json", dtype={"one": "int64", "two": "category"})
```

<!--
You can obtain the Modin version with

python -c "import modin; print(modin.__version__)"
-->

### Describe the problem
<!-- Describe the problem clearly here. -->

Pandas apparently is able to load the following file as a CSV :)
```json
{"one":{"0":111,"1":222,"2":333},"two":{"0":"AAA","1":"BBB","2":"CCC"}}
```
while on Modin I get an exception like this:
```
Traceback (most recent call last):
  File "cat_test.py", line 4, in <module>
    df1 = pd.read_csv("categories.json", dtype={"one": "int64", "two": "category"})
  File "/localdisk/gashiman/modin/modin/pandas/io.py", line 111, in parser_func
    return _read(**kwargs)
  File "/localdisk/gashiman/modin/modin/pandas/io.py", line 124, in _read
    pd_obj = BaseFactory.read_csv(**kwargs)
  File "/localdisk/gashiman/modin/modin/data_management/factories.py", line 69, in read_csv
    return cls._determine_engine()._read_csv(**kwargs)
  File "/localdisk/gashiman/modin/modin/data_management/factories.py", line 73, in _read_csv
    return cls.io_cls.read_csv(**kwargs)
  File "/localdisk/gashiman/modin/modin/engines/base/io/file_reader.py", line 29, in read
    query_compiler = cls._read(*args, **kwargs)
  File "/localdisk/gashiman/modin/modin/engines/base/io/text/csv_reader.py", line 199, in _read
    dtypes = cls.get_dtypes(dtypes_ids)
  File "/localdisk/gashiman/modin/modin/backends/pandas/parsers.py", line 61, in get_dtypes
    pandas.concat(cls.materialize(dtypes_ids), axis=1)
  File "/nfs/site/home/gashiman/.local/lib/python3.7/site-packages/pandas/core/reshape/concat.py", line 281, in concat
    sort=sort,
  File "/nfs/site/home/gashiman/.local/lib/python3.7/site-packages/pandas/core/reshape/concat.py", line 329, in __init__
    raise ValueError("No objects to concatenate")
ValueError: No objects to concatenate
```

### Source code / logs
<!-- Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem. -->



Discussion:

Resolving patch:
diff --git a/modin/engines/base/io/text/csv_reader.py b/modin/engines/base/io/text/csv_reader.py
--- a/modin/engines/base/io/text/csv_reader.py
+++ b/modin/engines/base/io/text/csv_reader.py
@@ -185,7 +185,7 @@ def _read(cls, filepath_or_buffer, **kwargs):
         # reported dtypes from differing rows can be different based on the inference in
         # the limited data seen by each worker. We use pandas to compute the exact dtype
         # over the whole column for each column. The index is set below.
-        dtypes = cls.get_dtypes(dtypes_ids)
+        dtypes = cls.get_dtypes(dtypes_ids) if len(dtypes_ids) > 0 else None
 
         partition_ids = cls.build_partition(partition_ids, row_lengths, column_widths)
         # If parse_dates is present, the column names that we have might not be


Test patch:
diff --git a/modin/pandas/test/test_io.py b/modin/pandas/test/test_io.py
--- a/modin/pandas/test/test_io.py
+++ b/modin/pandas/test/test_io.py
@@ -1184,6 +1184,13 @@ def test_from_csv_newlines_in_quotes(nrows, skiprows):
     )
 
 
+def test_read_csv_incorrect_data():
+    name = "modin/pandas/test/data/test_categories.json"
+    pandas_df, modin_df = pandas.read_csv(name), pd.read_csv(name)
+
+    df_equals(pandas_df, modin_df)
+
+
 @pytest.mark.skip(reason="No clipboard on Travis")
 def test_to_clipboard():
     modin_df = create_test_modin_dataframe()