We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import pandas as pd from databricks import koalas as ks pser = pd.Series([1, 2, 3]) >>> pser[pser == 1] 0 1 dtype: int64 kser = ks.from_pandas(pser) >>> kser[kser == 1] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/harutaka/.pyenv/versions/anaconda3-5.3.1/envs/kp-dev-env/lib/python3.6/site-packages/databricks/koalas/series.py", line 4188, in __getitem__ for level, index in enumerate(key)] File "/Users/harutaka/.pyenv/versions/anaconda3-5.3.1/envs/kp-dev-env/lib/python3.6/site-packages/databricks/koalas/series.py", line 4188, in <listcomp> for level, index in enumerate(key)] File "/Users/harutaka/.pyenv/versions/anaconda3-5.3.1/envs/kp-dev-env/lib/python3.6/site-packages/pyspark/sql/column.py", line 115, in _ njc = getattr(self._jc, name)(jc) File "/Users/harutaka/.pyenv/versions/anaconda3-5.3.1/envs/kp-dev-env/lib/python3.6/site-packages/py4j/java_gateway.py", line 1248, in __call__ args_command, temp_args = self._build_args(*args) File "/Users/harutaka/.pyenv/versions/anaconda3-5.3.1/envs/kp-dev-env/lib/python3.6/site-packages/py4j/java_gateway.py", line 1212, in _build_args (new_args, temp_args) = self._get_args(args) File "/Users/harutaka/.pyenv/versions/anaconda3-5.3.1/envs/kp-dev-env/lib/python3.6/site-packages/py4j/java_gateway.py", line 1199, in _get_args temp_arg = converter.convert(arg, self.gateway_client) File "/Users/harutaka/.pyenv/versions/anaconda3-5.3.1/envs/kp-dev-env/lib/python3.6/site-packages/py4j/java_collections.py", line 512, in convert for key in object.keys(): File "/Users/harutaka/.pyenv/versions/anaconda3-5.3.1/envs/kp-dev-env/lib/python3.6/site-packages/databricks/koalas/indexes.py", line 492, in __iter__ return _MissingPandasLikeIndex.__iter__(self) File "/Users/harutaka/.pyenv/versions/anaconda3-5.3.1/envs/kp-dev-env/lib/python3.6/site-packages/databricks/koalas/missing/__init__.py", line 24, in unsupported_function reason=reason) databricks.koalas.exceptions.PandasNotImplementedError: The method `pd.Index.__iter__()` is not implemented. If you want to collect your data as an NumPy array, use 'to_numpy()' instead.
The text was updated successfully, but these errors were encountered:
I found one comment about the concern of implementing __iter__ #1003 (comment)
__iter__
But personally it is not ideal way to raise this kind of exception. 🤔
Sorry, something went wrong.
@guyao the issue is Series.getitem is not expected to take Series. I created a PR to address this.
Allow Series.__getitem__ to take boolean Series (#1075)
75664fa
Resolves #1073
Successfully merging a pull request may close this issue.
The text was updated successfully, but these errors were encountered: