spark-instrumented-optimizer/python/pyspark/pandas
Xinrong Meng 423cff4567 [SPARK-36818][PYTHON] Fix filtering a Series by a boolean Series
### What changes were proposed in this pull request?
Fix filtering a Series (without a name) by a boolean Series.

### Why are the changes needed?
A bugfix. The issue is raised as https://github.com/databricks/koalas/issues/2199.

### Does this PR introduce _any_ user-facing change?
Yes.

#### From
```py
>>> psser = ps.Series([0, 1, 2, 3, 4])
>>> ps.set_option('compute.ops_on_diff_frames', True)
>>> psser.loc[ps.Series([True, True, True, False, False])]
Traceback (most recent call last):
...
KeyError: 'none key'

```

#### To
```py
>>> psser = ps.Series([0, 1, 2, 3, 4])
>>> ps.set_option('compute.ops_on_diff_frames', True)
>>> psser.loc[ps.Series([True, True, True, False, False])]
0    0
1    1
2    2
dtype: int64
```

### How was this patch tested?
Unit test.

Closes #34061 from xinrong-databricks/filter_series.

Authored-by: Xinrong Meng <xinrong.meng@databricks.com>
Signed-off-by: Takuya UESHIN <ueshin@databricks.com>
(cherry picked from commit 6a5ee0283c)
Signed-off-by: Takuya UESHIN <ueshin@databricks.com>
2021-09-22 12:53:06 -07:00
..
data_type_ops [SPARK-36531][SPARK-36515][PYTHON] Improve test coverage for data_type_ops/* and groupby 2021-09-08 10:23:06 +09:00
indexes [SPARK-36369][PYTHON] Fix Index.union to follow pandas 1.3 2021-08-27 09:59:32 +09:00
missing [SPARK-36470][PYTHON] Implement CategoricalIndex.map and DatetimeIndex.map 2021-08-23 10:11:21 +09:00
plot [SPARK-35344][PYTHON] Support creating a Column of numpy literals in pandas API on Spark 2021-06-28 19:03:42 -07:00
spark [SPARK-35859][PYTHON] Cleanup type hints in pandas-on-Spark 2021-06-29 10:52:24 -07:00
tests [SPARK-36818][PYTHON] Fix filtering a Series by a boolean Series 2021-09-22 12:53:06 -07:00
typedef [SPARK-36146][PYTHON][INFRA][TESTS] Upgrade Python version from 3.6 to 3.9 in GitHub Actions' linter/docs 2021-07-16 11:41:53 +09:00
usage_logging [SPARK-36470][PYTHON] Implement CategoricalIndex.map and DatetimeIndex.map 2021-08-23 10:11:21 +09:00
__init__.py [SPARK-36253][PYTHON][DOCS] Add versionadded to the top of pandas-on-Spark package 2021-07-22 14:21:53 +09:00
_typing.py [SPARK-35944][PYTHON] Introduce Name and Label type aliases 2021-07-01 09:40:07 +09:00
accessors.py [SPARK-36338][PYTHON][SQL] Move distributed-sequence implementation to Scala side 2021-07-30 22:29:31 +09:00
base.py [SPARK-36762][PYTHON] Fix Series.isin when Series has NaN values 2021-09-17 17:48:27 -07:00
categorical.py [SPARK-36368][PYTHON] Fix CategoricalOps.astype to follow pandas 1.3 2021-08-27 10:00:12 +09:00
config.py [SPARK-36338][PYTHON][FOLLOW-UP] Keep the original default value as 'sequence' in default index in pandas on Spark 2021-07-31 08:31:19 +09:00
datetimes.py [SPARK-35453][PYTHON] Move Koalas accessor to pandas_on_spark accessor 2021-06-01 10:33:10 +09:00
exceptions.py [SPARK-35465][PYTHON] Set up the mypy configuration to enable disallow_untyped_defs check for pandas APIs on Spark module 2021-05-21 11:03:35 -07:00
extensions.py [SPARK-35859][PYTHON] Cleanup type hints in pandas-on-Spark 2021-06-29 10:52:24 -07:00
frame.py [SPARK-36785][PYTHON] Fix DataFrame.isin when DataFrame has NaN value 2021-09-20 17:53:02 -07:00
generic.py [SPARK-36350][PYTHON] Move some logic related to F.nanvl to DataTypeOps 2021-07-30 11:20:01 -07:00
groupby.py [MINOR] Address conflicts for SPARK-36367 cherry-pick 2021-08-27 10:24:18 +09:00
indexing.py [SPARK-36818][PYTHON] Fix filtering a Series by a boolean Series 2021-09-22 12:53:06 -07:00
internal.py [SPARK-36338][PYTHON][SQL] Move distributed-sequence implementation to Scala side 2021-07-30 22:29:31 +09:00
ml.py [SPARK-36146][PYTHON][INFRA][TESTS] Upgrade Python version from 3.6 to 3.9 in GitHub Actions' linter/docs 2021-07-16 11:41:53 +09:00
mlflow.py [SPARK-36254][PYTHON][FOLLOW-UP] Skip mlflow related tests in pandas on Spark 2021-07-30 22:28:29 +09:00
namespace.py [SPARK-35810][PYTHON][FOLLWUP] Deprecate ps.broadcast API 2021-07-22 17:10:14 +09:00
numpy_compat.py [SPARK-35344][PYTHON] Support creating a Column of numpy literals in pandas API on Spark 2021-06-28 19:03:42 -07:00
series.py [SPARK-36771][PYTHON][3.2] Fix pop of Categorical Series 2021-09-21 19:16:27 -07:00
sql_processor.py [SPARK-35809][PYTHON] Add index_col argument for ps.sql 2021-07-22 17:08:42 +09:00
strings.py [SPARK-35761][PYTHON] Use type-annotation based pandas_udf or avoid specifying udf types to suppress warnings 2021-06-15 11:17:56 +09:00
utils.py [SPARK-35806][PYTHON] Mapping the mode argument to pandas in DataFrame.to_csv 2021-07-19 19:58:19 +09:00
window.py [SPARK-36388][SPARK-36386][PYTHON] Fix DataFrame groupby-rolling and groupby-expanding to follow pandas 1.3 2021-08-27 09:59:48 +09:00