Repository: modin-project/modin

Issue:
pandas.core.index is deprecated and will be removed in a future version
### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**:

Ubuntu 19.10 and Windows 10

- **Modin version** (`modin.__version__`):

0.7.2+45.g78395d9

- **Python version**:

Python 3.7.5

- **Code we can use to reproduce**:

Code from #1165 produces a warning about deprecated package 

<!--
You can obtain the Modin version with

python -c "import modin; print(modin.__version__)"
-->

### Describe the problem
<!-- Describe the problem clearly here. -->

Warning message which looks like this:
```
FutureWarning: pandas.core.index is deprecated and will be removed in a future version.  The public classes are available in the top-level namespace.
```
It was introduced in commit https://github.com/pandas-dev/pandas/commit/2892b9540cbb94d13eca3e5f28047ec61256f1b2 in pandas.

### 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. -->

pandas.core.index is deprecated and will be removed in a future version
### System information
- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**:

Ubuntu 19.10 and Windows 10

- **Modin version** (`modin.__version__`):

0.7.2+45.g78395d9

- **Python version**:

Python 3.7.5

- **Code we can use to reproduce**:

Code from #1165 produces a warning about deprecated package 

<!--
You can obtain the Modin version with

python -c "import modin; print(modin.__version__)"
-->

### Describe the problem
<!-- Describe the problem clearly here. -->

Warning message which looks like this:
```
FutureWarning: pandas.core.index is deprecated and will be removed in a future version.  The public classes are available in the top-level namespace.
```
It was introduced in commit https://github.com/pandas-dev/pandas/commit/2892b9540cbb94d13eca3e5f28047ec61256f1b2 in pandas.

### 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/__init__.py b/modin/__init__.py
--- a/modin/__init__.py
+++ b/modin/__init__.py
@@ -33,11 +33,6 @@ def custom_formatwarning(msg, category, *args, **kwargs):
     message="The pandas.datetime class is deprecated and will be removed from pandas in a future version. "
     "Import from datetime module instead.",
 )
-warnings.filterwarnings(
-    "ignore",
-    message="pandas.core.index is deprecated and will be removed in a future version. "
-    "The public classes are available in the top-level namespace.",
-)
 
 
 def get_execution_engine():
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
@@ -15,7 +15,7 @@
 import numpy as np
 from operator import itemgetter
 import pandas
-from pandas.core.index import ensure_index
+from pandas.core.indexes.api import ensure_index
 from pandas.core.dtypes.common import is_numeric_dtype
 
 from modin.backends.pandas.query_compiler import PandasQueryCompiler
diff --git a/modin/pandas/dataframe.py b/modin/pandas/dataframe.py
--- a/modin/pandas/dataframe.py
+++ b/modin/pandas/dataframe.py
@@ -19,7 +19,7 @@
     is_list_like,
     is_numeric_dtype,
 )
-from pandas.core.index import ensure_index_from_sequences
+from pandas.core.indexes.api import ensure_index_from_sequences
 from pandas.core.indexing import check_bool_indexer
 from pandas.util._validators import validate_bool_kwarg
 


Test patch: