We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Update pandas version to 1.0.3


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 from setuptools import setup, find_packages
2 import versioneer
3 
4 with open("README.md", "r") as fh:
5     long_description = fh.read()
6 
7 dask_deps = ["dask>=2.1.0", "distributed>=2.3.2"]
8 ray_deps = ["ray==0.8.0"]
9 
10 setup(
11     name="modin",
12     version=versioneer.get_version(),
13     cmdclass=versioneer.get_cmdclass(),
14     description="Modin: Make your pandas code run faster by changing one line of code.",
15     packages=find_packages(),
16     url="https://github.com/modin-project/modin",
17     long_description=long_description,
18     long_description_content_type="text/markdown",
19     install_requires=["pandas==1.0.1", "packaging"],
20     extras_require={
21         # can be installed by pip install modin[dask]
22         "dask": dask_deps,
23         "ray": ray_deps,
24         "all": dask_deps + ray_deps,
25     },
26     python_requires=">=3.5",
27 )
28
```

Path: `modin/pandas/__init__.py`
Content:
```
1 import pandas
2 
3 __pandas_version__ = "1.0.1"
4 
5 if pandas.__version__ != __pandas_version__:
6     import warnings
7 
8     warnings.warn(
9         "The pandas version installed does not match the required pandas version in "
10         "Modin. This may cause undesired side effects!".format(__pandas_version__)
11     )
12 
13 from pandas import (
14     eval,
15     unique,
16     value_counts,
17     cut,
18     to_numeric,
19     factorize,
20     test,
21     qcut,
22     date_range,
23     period_range,
24     Index,
25     MultiIndex,
26     CategoricalIndex,
27     bdate_range,
28     DatetimeIndex,
29     Timedelta,
30     Timestamp,
31     to_timedelta,
32     set_eng_float_format,
33     options,
34     set_option,
35     NaT,
36     PeriodIndex,
37     Categorical,
38     Interval,
39     UInt8Dtype,
40     UInt16Dtype,
41     UInt32Dtype,
42     UInt64Dtype,
43     SparseDtype,
44     Int8Dtype,
45     Int16Dtype,
46     Int32Dtype,
47     Int64Dtype,
48     StringDtype,
49     BooleanDtype,
50     CategoricalDtype,
51     DatetimeTZDtype,
52     IntervalDtype,
53     PeriodDtype,
54     RangeIndex,
55     Int64Index,
56     UInt64Index,
57     Float64Index,
58     TimedeltaIndex,
59     IntervalIndex,
60     IndexSlice,
61     Grouper,
62     array,
63     Period,
64     show_versions,
65     DateOffset,
66     timedelta_range,
67     infer_freq,
68     interval_range,
69     ExcelWriter,
70     datetime,
71     NamedAgg,
72     NA,
73 )
74 import threading
75 import os
76 import types
77 import sys
78 import multiprocessing
79 
80 from .. import __version__
81 from .concat import concat
82 from .dataframe import DataFrame
83 from .datetimes import to_datetime
84 from .io import (
85     read_csv,
86     read_parquet,
87     read_json,
88     read_html,
89     read_clipboard,
90     read_excel,
91     read_hdf,
92     read_feather,
93     read_stata,
94     read_sas,
95     read_pickle,
96     read_sql,
97     read_gbq,
98     read_table,
99     read_fwf,
100     read_sql_table,
101     read_sql_query,
102     read_spss,
103     ExcelFile,
104     to_pickle,
105     HDFStore,
106     json_normalize,
107     read_orc,
108 )
109 from .reshape import get_dummies, melt, crosstab, lreshape, wide_to_long
110 from .series import Series
111 from .general import (
112     isna,
113     isnull,
114     merge,
115     merge_asof,
116     merge_ordered,
117     pivot_table,
118     notnull,
119     notna,
120     pivot,
121 )
122 from .plotting import Plotting as plotting
123 from .. import __execution_engine__ as execution_engine
124 
125 # Set this so that Pandas doesn't try to multithread by itself
126 os.environ["OMP_NUM_THREADS"] = "1"
127 num_cpus = 1
128 
129 
130 def initialize_ray():
131     import ray
132 
133     """Initializes ray based on environment variables and internal defaults."""
134     if threading.current_thread().name == "MainThread":
135         import secrets
136 
137         plasma_directory = None
138         num_cpus = os.environ.get("MODIN_CPUS", None) or multiprocessing.cpu_count()
139         cluster = os.environ.get("MODIN_RAY_CLUSTER", None)
140         redis_address = os.environ.get("MODIN_REDIS_ADDRESS", None)
141         redis_password = secrets.token_hex(16)
142         if cluster == "True" and redis_address is not None:
143             # We only start ray in a cluster setting for the head node.
144             ray.init(
145                 num_cpus=int(num_cpus),
146                 include_webui=False,
147                 ignore_reinit_error=True,
148                 redis_address=redis_address,
149                 redis_password=redis_password,
150                 logging_level=100,
151             )
152         elif cluster is None:
153             object_store_memory = os.environ.get("MODIN_MEMORY", None)
154             if os.environ.get("MODIN_OUT_OF_CORE", "False").title() == "True":
155                 from tempfile import gettempdir
156 
157                 plasma_directory = gettempdir()
158                 # We may have already set the memory from the environment variable, we don't
159                 # want to overwrite that value if we have.
160                 if object_store_memory is None:
161                     # Round down to the nearest Gigabyte.
162                     mem_bytes = ray.utils.get_system_memory() // 10 ** 9 * 10 ** 9
163                     # Default to 8x memory for out of core
164                     object_store_memory = 8 * mem_bytes
165             # In case anything failed above, we can still improve the memory for Modin.
166             if object_store_memory is None:
167                 # Round down to the nearest Gigabyte.
168                 object_store_memory = int(
169                     0.6 * ray.utils.get_system_memory() // 10 ** 9 * 10 ** 9
170                 )
171                 # If the memory pool is smaller than 2GB, just use the default in ray.
172                 if object_store_memory == 0:
173                     object_store_memory = None
174             else:
175                 object_store_memory = int(object_store_memory)
176             ray.init(
177                 num_cpus=int(num_cpus),
178                 include_webui=False,
179                 ignore_reinit_error=True,
180                 plasma_directory=plasma_directory,
181                 object_store_memory=object_store_memory,
182                 redis_address=redis_address,
183                 redis_password=redis_password,
184                 logging_level=100,
185                 memory=object_store_memory,
186             )
187         # Register custom serializer for method objects to avoid warning message.
188         # We serialize `MethodType` objects when we use AxisPartition operations.
189         ray.register_custom_serializer(types.MethodType, use_pickle=True)
190 
191         # Register a fix import function to run on all_workers including the driver.
192         # This is a hack solution to fix #647, #746
193         def move_stdlib_ahead_of_site_packages(*args):
194             site_packages_path = None
195             site_packages_path_index = -1
196             for i, path in enumerate(sys.path):
197                 if sys.exec_prefix in path and path.endswith("site-packages"):
198                     site_packages_path = path
199                     site_packages_path_index = i
200                     # break on first found
201                     break
202 
203             if site_packages_path is not None:
204                 # stdlib packages layout as follows:
205                 # - python3.x
206                 #   - typing.py
207                 #   - site-packages/
208                 #     - pandas
209                 # So extracting the dirname of the site_packages can point us
210                 # to the directory containing standard libraries.
211                 sys.path.insert(
212                     site_packages_path_index, os.path.dirname(site_packages_path)
213                 )
214 
215         move_stdlib_ahead_of_site_packages()
216         ray.worker.global_worker.run_function_on_all_workers(
217             move_stdlib_ahead_of_site_packages
218         )
219 
220 
221 if execution_engine == "Ray":
222     import ray
223 
224     initialize_ray()
225     num_cpus = ray.cluster_resources()["CPU"]
226 elif execution_engine == "Dask":  # pragma: no cover
227     from distributed.client import get_client
228     import warnings
229 
230     if threading.current_thread().name == "MainThread":
231         warnings.warn("The Dask Engine for Modin is experimental.")
232         try:
233             client = get_client()
234         except ValueError:
235             from distributed import Client
236 
237             num_cpus = os.environ.get("MODIN_CPUS", None) or multiprocessing.cpu_count()
238             client = Client(n_workers=int(num_cpus))
239 elif execution_engine != "Python":
240     raise ImportError("Unrecognized execution engine: {}.".format(execution_engine))
241 
242 DEFAULT_NPARTITIONS = max(4, int(num_cpus))
243 
244 __all__ = [
245     "DataFrame",
246     "Series",
247     "read_csv",
248     "read_parquet",
249     "read_json",
250     "read_html",
251     "read_clipboard",
252     "read_excel",
253     "read_hdf",
254     "read_feather",
255     "read_stata",
256     "read_sas",
257     "read_pickle",
258     "read_sql",
259     "read_gbq",
260     "read_table",
261     "read_spss",
262     "read_orc",
263     "json_normalize",
264     "concat",
265     "eval",
266     "unique",
267     "value_counts",
268     "cut",
269     "to_numeric",
270     "factorize",
271     "test",
272     "qcut",
273     "to_datetime",
274     "get_dummies",
275     "isna",
276     "isnull",
277     "merge",
278     "pivot_table",
279     "date_range",
280     "Index",
281     "MultiIndex",
282     "Series",
283     "bdate_range",
284     "period_range",
285     "DatetimeIndex",
286     "to_timedelta",
287     "set_eng_float_format",
288     "options",
289     "set_option",
290     "CategoricalIndex",
291     "Timedelta",
292     "Timestamp",
293     "NaT",
294     "PeriodIndex",
295     "Categorical",
296     "__version__",
297     "melt",
298     "crosstab",
299     "plotting",
300     "Interval",
301     "UInt8Dtype",
302     "UInt16Dtype",
303     "UInt32Dtype",
304     "UInt64Dtype",
305     "SparseDtype",
306     "Int8Dtype",
307     "Int16Dtype",
308     "Int32Dtype",
309     "Int64Dtype",
310     "CategoricalDtype",
311     "DatetimeTZDtype",
312     "IntervalDtype",
313     "PeriodDtype",
314     "BooleanDtype",
315     "StringDtype",
316     "NA",
317     "RangeIndex",
318     "Int64Index",
319     "UInt64Index",
320     "Float64Index",
321     "TimedeltaIndex",
322     "IntervalIndex",
323     "IndexSlice",
324     "Grouper",
325     "array",
326     "Period",
327     "show_versions",
328     "DateOffset",
329     "timedelta_range",
330     "infer_freq",
331     "interval_range",
332     "ExcelWriter",
333     "read_fwf",
334     "read_sql_table",
335     "read_sql_query",
336     "ExcelFile",
337     "to_pickle",
338     "HDFStore",
339     "lreshape",
340     "wide_to_long",
341     "merge_asof",
342     "merge_ordered",
343     "notnull",
344     "notna",
345     "pivot",
346     "datetime",
347     "NamedAgg",
348     "DEFAULT_NPARTITIONS",
349 ]
350 
351 del pandas
352
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/modin/pandas/__init__.py b/modin/pandas/__init__.py
--- a/modin/pandas/__init__.py
+++ b/modin/pandas/__init__.py
@@ -1,6 +1,6 @@
 import pandas
 
-__pandas_version__ = "1.0.1"
+__pandas_version__ = "1.0.3"
 
 if pandas.__version__ != __pandas_version__:
     import warnings
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -16,7 +16,7 @@
     url="https://github.com/modin-project/modin",
     long_description=long_description,
     long_description_content_type="text/markdown",
-    install_requires=["pandas==1.0.1", "packaging"],
+    install_requires=["pandas==1.0.3", "packaging"],
     extras_require={
         # can be installed by pip install modin[dask]
         "dask": dask_deps,

{"golden_diff": "diff --git a/modin/pandas/__init__.py b/modin/pandas/__init__.py\n--- a/modin/pandas/__init__.py\n+++ b/modin/pandas/__init__.py\n@@ -1,6 +1,6 @@\n import pandas\n \n-__pandas_version__ = \"1.0.1\"\n+__pandas_version__ = \"1.0.3\"\n \n if pandas.__version__ != __pandas_version__:\n     import warnings\ndiff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -16,7 +16,7 @@\n     url=\"https://github.com/modin-project/modin\",\n     long_description=long_description,\n     long_description_content_type=\"text/markdown\",\n-    install_requires=[\"pandas==1.0.1\", \"packaging\"],\n+    install_requires=[\"pandas==1.0.3\", \"packaging\"],\n     extras_require={\n         # can be installed by pip install modin[dask]\n         \"dask\": dask_deps,\n", "issue": "Update pandas version to 1.0.3\n\n", "before_files": [{"content": "from setuptools import setup, find_packages\nimport versioneer\n\nwith open(\"README.md\", \"r\") as fh:\n    long_description = fh.read()\n\ndask_deps = [\"dask>=2.1.0\", \"distributed>=2.3.2\"]\nray_deps = [\"ray==0.8.0\"]\n\nsetup(\n    name=\"modin\",\n    version=versioneer.get_version(),\n    cmdclass=versioneer.get_cmdclass(),\n    description=\"Modin: Make your pandas code run faster by changing one line of code.\",\n    packages=find_packages(),\n    url=\"https://github.com/modin-project/modin\",\n    long_description=long_description,\n    long_description_content_type=\"text/markdown\",\n    install_requires=[\"pandas==1.0.1\", \"packaging\"],\n    extras_require={\n        # can be installed by pip install modin[dask]\n        \"dask\": dask_deps,\n        \"ray\": ray_deps,\n        \"all\": dask_deps + ray_deps,\n    },\n    python_requires=\">=3.5\",\n)\n", "path": "setup.py"}, {"content": "import pandas\n\n__pandas_version__ = \"1.0.1\"\n\nif pandas.__version__ != __pandas_version__:\n    import warnings\n\n    warnings.warn(\n        \"The pandas version installed does not match the required pandas version in \"\n        \"Modin. This may cause undesired side effects!\".format(__pandas_version__)\n    )\n\nfrom pandas import (\n    eval,\n    unique,\n    value_counts,\n    cut,\n    to_numeric,\n    factorize,\n    test,\n    qcut,\n    date_range,\n    period_range,\n    Index,\n    MultiIndex,\n    CategoricalIndex,\n    bdate_range,\n    DatetimeIndex,\n    Timedelta,\n    Timestamp,\n    to_timedelta,\n    set_eng_float_format,\n    options,\n    set_option,\n    NaT,\n    PeriodIndex,\n    Categorical,\n    Interval,\n    UInt8Dtype,\n    UInt16Dtype,\n    UInt32Dtype,\n    UInt64Dtype,\n    SparseDtype,\n    Int8Dtype,\n    Int16Dtype,\n    Int32Dtype,\n    Int64Dtype,\n    StringDtype,\n    BooleanDtype,\n    CategoricalDtype,\n    DatetimeTZDtype,\n    IntervalDtype,\n    PeriodDtype,\n    RangeIndex,\n    Int64Index,\n    UInt64Index,\n    Float64Index,\n    TimedeltaIndex,\n    IntervalIndex,\n    IndexSlice,\n    Grouper,\n    array,\n    Period,\n    show_versions,\n    DateOffset,\n    timedelta_range,\n    infer_freq,\n    interval_range,\n    ExcelWriter,\n    datetime,\n    NamedAgg,\n    NA,\n)\nimport threading\nimport os\nimport types\nimport sys\nimport multiprocessing\n\nfrom .. import __version__\nfrom .concat import concat\nfrom .dataframe import DataFrame\nfrom .datetimes import to_datetime\nfrom .io import (\n    read_csv,\n    read_parquet,\n    read_json,\n    read_html,\n    read_clipboard,\n    read_excel,\n    read_hdf,\n    read_feather,\n    read_stata,\n    read_sas,\n    read_pickle,\n    read_sql,\n    read_gbq,\n    read_table,\n    read_fwf,\n    read_sql_table,\n    read_sql_query,\n    read_spss,\n    ExcelFile,\n    to_pickle,\n    HDFStore,\n    json_normalize,\n    read_orc,\n)\nfrom .reshape import get_dummies, melt, crosstab, lreshape, wide_to_long\nfrom .series import Series\nfrom .general import (\n    isna,\n    isnull,\n    merge,\n    merge_asof,\n    merge_ordered,\n    pivot_table,\n    notnull,\n    notna,\n    pivot,\n)\nfrom .plotting import Plotting as plotting\nfrom .. import __execution_engine__ as execution_engine\n\n# Set this so that Pandas doesn't try to multithread by itself\nos.environ[\"OMP_NUM_THREADS\"] = \"1\"\nnum_cpus = 1\n\n\ndef initialize_ray():\n    import ray\n\n    \"\"\"Initializes ray based on environment variables and internal defaults.\"\"\"\n    if threading.current_thread().name == \"MainThread\":\n        import secrets\n\n        plasma_directory = None\n        num_cpus = os.environ.get(\"MODIN_CPUS\", None) or multiprocessing.cpu_count()\n        cluster = os.environ.get(\"MODIN_RAY_CLUSTER\", None)\n        redis_address = os.environ.get(\"MODIN_REDIS_ADDRESS\", None)\n        redis_password = secrets.token_hex(16)\n        if cluster == \"True\" and redis_address is not None:\n            # We only start ray in a cluster setting for the head node.\n            ray.init(\n                num_cpus=int(num_cpus),\n                include_webui=False,\n                ignore_reinit_error=True,\n                redis_address=redis_address,\n                redis_password=redis_password,\n                logging_level=100,\n            )\n        elif cluster is None:\n            object_store_memory = os.environ.get(\"MODIN_MEMORY\", None)\n            if os.environ.get(\"MODIN_OUT_OF_CORE\", \"False\").title() == \"True\":\n                from tempfile import gettempdir\n\n                plasma_directory = gettempdir()\n                # We may have already set the memory from the environment variable, we don't\n                # want to overwrite that value if we have.\n                if object_store_memory is None:\n                    # Round down to the nearest Gigabyte.\n                    mem_bytes = ray.utils.get_system_memory() // 10 ** 9 * 10 ** 9\n                    # Default to 8x memory for out of core\n                    object_store_memory = 8 * mem_bytes\n            # In case anything failed above, we can still improve the memory for Modin.\n            if object_store_memory is None:\n                # Round down to the nearest Gigabyte.\n                object_store_memory = int(\n                    0.6 * ray.utils.get_system_memory() // 10 ** 9 * 10 ** 9\n                )\n                # If the memory pool is smaller than 2GB, just use the default in ray.\n                if object_store_memory == 0:\n                    object_store_memory = None\n            else:\n                object_store_memory = int(object_store_memory)\n            ray.init(\n                num_cpus=int(num_cpus),\n                include_webui=False,\n                ignore_reinit_error=True,\n                plasma_directory=plasma_directory,\n                object_store_memory=object_store_memory,\n                redis_address=redis_address,\n                redis_password=redis_password,\n                logging_level=100,\n                memory=object_store_memory,\n            )\n        # Register custom serializer for method objects to avoid warning message.\n        # We serialize `MethodType` objects when we use AxisPartition operations.\n        ray.register_custom_serializer(types.MethodType, use_pickle=True)\n\n        # Register a fix import function to run on all_workers including the driver.\n        # This is a hack solution to fix #647, #746\n        def move_stdlib_ahead_of_site_packages(*args):\n            site_packages_path = None\n            site_packages_path_index = -1\n            for i, path in enumerate(sys.path):\n                if sys.exec_prefix in path and path.endswith(\"site-packages\"):\n                    site_packages_path = path\n                    site_packages_path_index = i\n                    # break on first found\n                    break\n\n            if site_packages_path is not None:\n                # stdlib packages layout as follows:\n                # - python3.x\n                #   - typing.py\n                #   - site-packages/\n                #     - pandas\n                # So extracting the dirname of the site_packages can point us\n                # to the directory containing standard libraries.\n                sys.path.insert(\n                    site_packages_path_index, os.path.dirname(site_packages_path)\n                )\n\n        move_stdlib_ahead_of_site_packages()\n        ray.worker.global_worker.run_function_on_all_workers(\n            move_stdlib_ahead_of_site_packages\n        )\n\n\nif execution_engine == \"Ray\":\n    import ray\n\n    initialize_ray()\n    num_cpus = ray.cluster_resources()[\"CPU\"]\nelif execution_engine == \"Dask\":  # pragma: no cover\n    from distributed.client import get_client\n    import warnings\n\n    if threading.current_thread().name == \"MainThread\":\n        warnings.warn(\"The Dask Engine for Modin is experimental.\")\n        try:\n            client = get_client()\n        except ValueError:\n            from distributed import Client\n\n            num_cpus = os.environ.get(\"MODIN_CPUS\", None) or multiprocessing.cpu_count()\n            client = Client(n_workers=int(num_cpus))\nelif execution_engine != \"Python\":\n    raise ImportError(\"Unrecognized execution engine: {}.\".format(execution_engine))\n\nDEFAULT_NPARTITIONS = max(4, int(num_cpus))\n\n__all__ = [\n    \"DataFrame\",\n    \"Series\",\n    \"read_csv\",\n    \"read_parquet\",\n    \"read_json\",\n    \"read_html\",\n    \"read_clipboard\",\n    \"read_excel\",\n    \"read_hdf\",\n    \"read_feather\",\n    \"read_stata\",\n    \"read_sas\",\n    \"read_pickle\",\n    \"read_sql\",\n    \"read_gbq\",\n    \"read_table\",\n    \"read_spss\",\n    \"read_orc\",\n    \"json_normalize\",\n    \"concat\",\n    \"eval\",\n    \"unique\",\n    \"value_counts\",\n    \"cut\",\n    \"to_numeric\",\n    \"factorize\",\n    \"test\",\n    \"qcut\",\n    \"to_datetime\",\n    \"get_dummies\",\n    \"isna\",\n    \"isnull\",\n    \"merge\",\n    \"pivot_table\",\n    \"date_range\",\n    \"Index\",\n    \"MultiIndex\",\n    \"Series\",\n    \"bdate_range\",\n    \"period_range\",\n    \"DatetimeIndex\",\n    \"to_timedelta\",\n    \"set_eng_float_format\",\n    \"options\",\n    \"set_option\",\n    \"CategoricalIndex\",\n    \"Timedelta\",\n    \"Timestamp\",\n    \"NaT\",\n    \"PeriodIndex\",\n    \"Categorical\",\n    \"__version__\",\n    \"melt\",\n    \"crosstab\",\n    \"plotting\",\n    \"Interval\",\n    \"UInt8Dtype\",\n    \"UInt16Dtype\",\n    \"UInt32Dtype\",\n    \"UInt64Dtype\",\n    \"SparseDtype\",\n    \"Int8Dtype\",\n    \"Int16Dtype\",\n    \"Int32Dtype\",\n    \"Int64Dtype\",\n    \"CategoricalDtype\",\n    \"DatetimeTZDtype\",\n    \"IntervalDtype\",\n    \"PeriodDtype\",\n    \"BooleanDtype\",\n    \"StringDtype\",\n    \"NA\",\n    \"RangeIndex\",\n    \"Int64Index\",\n    \"UInt64Index\",\n    \"Float64Index\",\n    \"TimedeltaIndex\",\n    \"IntervalIndex\",\n    \"IndexSlice\",\n    \"Grouper\",\n    \"array\",\n    \"Period\",\n    \"show_versions\",\n    \"DateOffset\",\n    \"timedelta_range\",\n    \"infer_freq\",\n    \"interval_range\",\n    \"ExcelWriter\",\n    \"read_fwf\",\n    \"read_sql_table\",\n    \"read_sql_query\",\n    \"ExcelFile\",\n    \"to_pickle\",\n    \"HDFStore\",\n    \"lreshape\",\n    \"wide_to_long\",\n    \"merge_asof\",\n    \"merge_ordered\",\n    \"notnull\",\n    \"notna\",\n    \"pivot\",\n    \"datetime\",\n    \"NamedAgg\",\n    \"DEFAULT_NPARTITIONS\",\n]\n\ndel pandas\n", "path": "modin/pandas/__init__.py"}], "after_files": [{"content": "from setuptools import setup, find_packages\nimport versioneer\n\nwith open(\"README.md\", \"r\") as fh:\n    long_description = fh.read()\n\ndask_deps = [\"dask>=2.1.0\", \"distributed>=2.3.2\"]\nray_deps = [\"ray==0.8.0\"]\n\nsetup(\n    name=\"modin\",\n    version=versioneer.get_version(),\n    cmdclass=versioneer.get_cmdclass(),\n    description=\"Modin: Make your pandas code run faster by changing one line of code.\",\n    packages=find_packages(),\n    url=\"https://github.com/modin-project/modin\",\n    long_description=long_description,\n    long_description_content_type=\"text/markdown\",\n    install_requires=[\"pandas==1.0.3\", \"packaging\"],\n    extras_require={\n        # can be installed by pip install modin[dask]\n        \"dask\": dask_deps,\n        \"ray\": ray_deps,\n        \"all\": dask_deps + ray_deps,\n    },\n    python_requires=\">=3.5\",\n)\n", "path": "setup.py"}, {"content": "import pandas\n\n__pandas_version__ = \"1.0.3\"\n\nif pandas.__version__ != __pandas_version__:\n    import warnings\n\n    warnings.warn(\n        \"The pandas version installed does not match the required pandas version in \"\n        \"Modin. This may cause undesired side effects!\".format(__pandas_version__)\n    )\n\nfrom pandas import (\n    eval,\n    unique,\n    value_counts,\n    cut,\n    to_numeric,\n    factorize,\n    test,\n    qcut,\n    date_range,\n    period_range,\n    Index,\n    MultiIndex,\n    CategoricalIndex,\n    bdate_range,\n    DatetimeIndex,\n    Timedelta,\n    Timestamp,\n    to_timedelta,\n    set_eng_float_format,\n    options,\n    set_option,\n    NaT,\n    PeriodIndex,\n    Categorical,\n    Interval,\n    UInt8Dtype,\n    UInt16Dtype,\n    UInt32Dtype,\n    UInt64Dtype,\n    SparseDtype,\n    Int8Dtype,\n    Int16Dtype,\n    Int32Dtype,\n    Int64Dtype,\n    StringDtype,\n    BooleanDtype,\n    CategoricalDtype,\n    DatetimeTZDtype,\n    IntervalDtype,\n    PeriodDtype,\n    RangeIndex,\n    Int64Index,\n    UInt64Index,\n    Float64Index,\n    TimedeltaIndex,\n    IntervalIndex,\n    IndexSlice,\n    Grouper,\n    array,\n    Period,\n    show_versions,\n    DateOffset,\n    timedelta_range,\n    infer_freq,\n    interval_range,\n    ExcelWriter,\n    datetime,\n    NamedAgg,\n    NA,\n)\nimport threading\nimport os\nimport types\nimport sys\nimport multiprocessing\n\nfrom .. import __version__\nfrom .concat import concat\nfrom .dataframe import DataFrame\nfrom .datetimes import to_datetime\nfrom .io import (\n    read_csv,\n    read_parquet,\n    read_json,\n    read_html,\n    read_clipboard,\n    read_excel,\n    read_hdf,\n    read_feather,\n    read_stata,\n    read_sas,\n    read_pickle,\n    read_sql,\n    read_gbq,\n    read_table,\n    read_fwf,\n    read_sql_table,\n    read_sql_query,\n    read_spss,\n    ExcelFile,\n    to_pickle,\n    HDFStore,\n    json_normalize,\n    read_orc,\n)\nfrom .reshape import get_dummies, melt, crosstab, lreshape, wide_to_long\nfrom .series import Series\nfrom .general import (\n    isna,\n    isnull,\n    merge,\n    merge_asof,\n    merge_ordered,\n    pivot_table,\n    notnull,\n    notna,\n    pivot,\n)\nfrom .plotting import Plotting as plotting\nfrom .. import __execution_engine__ as execution_engine\n\n# Set this so that Pandas doesn't try to multithread by itself\nos.environ[\"OMP_NUM_THREADS\"] = \"1\"\nnum_cpus = 1\n\n\ndef initialize_ray():\n    import ray\n\n    \"\"\"Initializes ray based on environment variables and internal defaults.\"\"\"\n    if threading.current_thread().name == \"MainThread\":\n        import secrets\n\n        plasma_directory = None\n        num_cpus = os.environ.get(\"MODIN_CPUS\", None) or multiprocessing.cpu_count()\n        cluster = os.environ.get(\"MODIN_RAY_CLUSTER\", None)\n        redis_address = os.environ.get(\"MODIN_REDIS_ADDRESS\", None)\n        redis_password = secrets.token_hex(16)\n        if cluster == \"True\" and redis_address is not None:\n            # We only start ray in a cluster setting for the head node.\n            ray.init(\n                num_cpus=int(num_cpus),\n                include_webui=False,\n                ignore_reinit_error=True,\n                redis_address=redis_address,\n                redis_password=redis_password,\n                logging_level=100,\n            )\n        elif cluster is None:\n            object_store_memory = os.environ.get(\"MODIN_MEMORY\", None)\n            if os.environ.get(\"MODIN_OUT_OF_CORE\", \"False\").title() == \"True\":\n                from tempfile import gettempdir\n\n                plasma_directory = gettempdir()\n                # We may have already set the memory from the environment variable, we don't\n                # want to overwrite that value if we have.\n                if object_store_memory is None:\n                    # Round down to the nearest Gigabyte.\n                    mem_bytes = ray.utils.get_system_memory() // 10 ** 9 * 10 ** 9\n                    # Default to 8x memory for out of core\n                    object_store_memory = 8 * mem_bytes\n            # In case anything failed above, we can still improve the memory for Modin.\n            if object_store_memory is None:\n                # Round down to the nearest Gigabyte.\n                object_store_memory = int(\n                    0.6 * ray.utils.get_system_memory() // 10 ** 9 * 10 ** 9\n                )\n                # If the memory pool is smaller than 2GB, just use the default in ray.\n                if object_store_memory == 0:\n                    object_store_memory = None\n            else:\n                object_store_memory = int(object_store_memory)\n            ray.init(\n                num_cpus=int(num_cpus),\n                include_webui=False,\n                ignore_reinit_error=True,\n                plasma_directory=plasma_directory,\n                object_store_memory=object_store_memory,\n                redis_address=redis_address,\n                redis_password=redis_password,\n                logging_level=100,\n                memory=object_store_memory,\n            )\n        # Register custom serializer for method objects to avoid warning message.\n        # We serialize `MethodType` objects when we use AxisPartition operations.\n        ray.register_custom_serializer(types.MethodType, use_pickle=True)\n\n        # Register a fix import function to run on all_workers including the driver.\n        # This is a hack solution to fix #647, #746\n        def move_stdlib_ahead_of_site_packages(*args):\n            site_packages_path = None\n            site_packages_path_index = -1\n            for i, path in enumerate(sys.path):\n                if sys.exec_prefix in path and path.endswith(\"site-packages\"):\n                    site_packages_path = path\n                    site_packages_path_index = i\n                    # break on first found\n                    break\n\n            if site_packages_path is not None:\n                # stdlib packages layout as follows:\n                # - python3.x\n                #   - typing.py\n                #   - site-packages/\n                #     - pandas\n                # So extracting the dirname of the site_packages can point us\n                # to the directory containing standard libraries.\n                sys.path.insert(\n                    site_packages_path_index, os.path.dirname(site_packages_path)\n                )\n\n        move_stdlib_ahead_of_site_packages()\n        ray.worker.global_worker.run_function_on_all_workers(\n            move_stdlib_ahead_of_site_packages\n        )\n\n\nif execution_engine == \"Ray\":\n    import ray\n\n    initialize_ray()\n    num_cpus = ray.cluster_resources()[\"CPU\"]\nelif execution_engine == \"Dask\":  # pragma: no cover\n    from distributed.client import get_client\n    import warnings\n\n    if threading.current_thread().name == \"MainThread\":\n        warnings.warn(\"The Dask Engine for Modin is experimental.\")\n        try:\n            client = get_client()\n        except ValueError:\n            from distributed import Client\n\n            num_cpus = os.environ.get(\"MODIN_CPUS\", None) or multiprocessing.cpu_count()\n            client = Client(n_workers=int(num_cpus))\nelif execution_engine != \"Python\":\n    raise ImportError(\"Unrecognized execution engine: {}.\".format(execution_engine))\n\nDEFAULT_NPARTITIONS = max(4, int(num_cpus))\n\n__all__ = [\n    \"DataFrame\",\n    \"Series\",\n    \"read_csv\",\n    \"read_parquet\",\n    \"read_json\",\n    \"read_html\",\n    \"read_clipboard\",\n    \"read_excel\",\n    \"read_hdf\",\n    \"read_feather\",\n    \"read_stata\",\n    \"read_sas\",\n    \"read_pickle\",\n    \"read_sql\",\n    \"read_gbq\",\n    \"read_table\",\n    \"read_spss\",\n    \"read_orc\",\n    \"json_normalize\",\n    \"concat\",\n    \"eval\",\n    \"unique\",\n    \"value_counts\",\n    \"cut\",\n    \"to_numeric\",\n    \"factorize\",\n    \"test\",\n    \"qcut\",\n    \"to_datetime\",\n    \"get_dummies\",\n    \"isna\",\n    \"isnull\",\n    \"merge\",\n    \"pivot_table\",\n    \"date_range\",\n    \"Index\",\n    \"MultiIndex\",\n    \"Series\",\n    \"bdate_range\",\n    \"period_range\",\n    \"DatetimeIndex\",\n    \"to_timedelta\",\n    \"set_eng_float_format\",\n    \"options\",\n    \"set_option\",\n    \"CategoricalIndex\",\n    \"Timedelta\",\n    \"Timestamp\",\n    \"NaT\",\n    \"PeriodIndex\",\n    \"Categorical\",\n    \"__version__\",\n    \"melt\",\n    \"crosstab\",\n    \"plotting\",\n    \"Interval\",\n    \"UInt8Dtype\",\n    \"UInt16Dtype\",\n    \"UInt32Dtype\",\n    \"UInt64Dtype\",\n    \"SparseDtype\",\n    \"Int8Dtype\",\n    \"Int16Dtype\",\n    \"Int32Dtype\",\n    \"Int64Dtype\",\n    \"CategoricalDtype\",\n    \"DatetimeTZDtype\",\n    \"IntervalDtype\",\n    \"PeriodDtype\",\n    \"BooleanDtype\",\n    \"StringDtype\",\n    \"NA\",\n    \"RangeIndex\",\n    \"Int64Index\",\n    \"UInt64Index\",\n    \"Float64Index\",\n    \"TimedeltaIndex\",\n    \"IntervalIndex\",\n    \"IndexSlice\",\n    \"Grouper\",\n    \"array\",\n    \"Period\",\n    \"show_versions\",\n    \"DateOffset\",\n    \"timedelta_range\",\n    \"infer_freq\",\n    \"interval_range\",\n    \"ExcelWriter\",\n    \"read_fwf\",\n    \"read_sql_table\",\n    \"read_sql_query\",\n    \"ExcelFile\",\n    \"to_pickle\",\n    \"HDFStore\",\n    \"lreshape\",\n    \"wide_to_long\",\n    \"merge_asof\",\n    \"merge_ordered\",\n    \"notnull\",\n    \"notna\",\n    \"pivot\",\n    \"datetime\",\n    \"NamedAgg\",\n    \"DEFAULT_NPARTITIONS\",\n]\n\ndel pandas\n", "path": "modin/pandas/__init__.py"}]}