Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gotImport Error #2228

Open
ParthRMehta opened this issue Mar 22, 2023 · 1 comment
Open

gotImport Error #2228

ParthRMehta opened this issue Mar 22, 2023 · 1 comment

Comments

@ParthRMehta
Copy link

ImportError Traceback (most recent call last)
Cell In[8], line 4
2 import numpy as np
3 from collections.abc import Iterable
----> 4 import databricks.koalas as ks
5 import matplotlib.pyplot as plt
7 from pyspark import SparkContext, SparkConf

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\databricks\koalas_init_.py:74
66 raise RuntimeError(
67 "Please explicitly unset 'ARROW_PRE_0_15_IPC_FORMAT' environment variable in both "
68 "driver and executor sides. It is required to set this environment variable only "
69 "when you use pyarrow>=0.15 and pyspark<3.0."
70 )
73 from databricks.koalas.frame import DataFrame
---> 74 from databricks.koalas.indexes import Index, MultiIndex
75 from databricks.koalas.series import Series
76 from databricks.koalas.typedef import pandas_wraps

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\databricks\koalas\indexes.py:51
49 from databricks.koalas.frame import DataFrame
50 from databricks.koalas.missing.indexes import _MissingPandasLikeIndex, _MissingPandasLikeMultiIndex
---> 51 from databricks.koalas.series import Series, _col
52 from databricks.koalas.utils import (
53 compare_allow_null,
54 compare_disallow_null,
(...)
61 validate_bool_kwarg,
62 )
63 from databricks.koalas.internal import _InternalFrame, NATURAL_ORDER_COLUMN_NAME

File ~\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\databricks\koalas\series.py:22
20 import re
21 import inspect
---> 22 from collections import Iterable, OrderedDict
23 from functools import partial, wraps, reduce
24 from typing import Any, Generic, List, Optional, Tuple, TypeVar, Union

ImportError: cannot import name 'Iterable' from 'collections' (C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.2800.0_x64__qbz5n2kfra8p0\lib\collections_init_.py)

@itholic
Copy link
Contributor

itholic commented Jul 5, 2024

Sorry for the late reply my friend, actually this repository is no longer maintained.

Can you use Pandas API on Spark instead of Koalas as the Koalas was ported into PySpark??

You can just simply install pyspark and change your import as below then your existing Koalas code just works:

# import databricks.koalas as ks
import pyspark.pandas as ks

(your existing Koalas code)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants