This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push:
new f6861c3918b [SPARK-46288][PS][TESTS] Remove unused code in
`pyspark.pandas.tests.frame.*`
f6861c3918b is described below
commit f6861c3918bdedf5d8d89dbecced3317cc9dc490
Author: Ruifeng Zheng <[email protected]>
AuthorDate: Wed Dec 6 10:44:04 2023 -0800
[SPARK-46288][PS][TESTS] Remove unused code in
`pyspark.pandas.tests.frame.*`
### What changes were proposed in this pull request?
Remove unused code in `pyspark.pandas.tests.frame.*`
### Why are the changes needed?
code clean up
### Does this PR introduce _any_ user-facing change?
no, test-only
### How was this patch tested?
ci
### Was this patch authored or co-authored using generative AI tooling?
no
Closes #44212 from zhengruifeng/ps_frame_cleanup.
Authored-by: Ruifeng Zheng <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
python/pyspark/pandas/tests/frame/test_conversion.py | 6 ------
python/pyspark/pandas/tests/frame/test_reindexing.py | 13 -------------
python/pyspark/pandas/tests/frame/test_spark.py | 6 ------
python/pyspark/pandas/tests/frame/test_take.py | 14 --------------
python/pyspark/pandas/tests/frame/test_time_series.py | 13 -------------
python/pyspark/pandas/tests/frame/test_truncate.py | 14 --------------
6 files changed, 66 deletions(-)
diff --git a/python/pyspark/pandas/tests/frame/test_conversion.py
b/python/pyspark/pandas/tests/frame/test_conversion.py
index 116a7d31c11..eefb461239e 100644
--- a/python/pyspark/pandas/tests/frame/test_conversion.py
+++ b/python/pyspark/pandas/tests/frame/test_conversion.py
@@ -34,12 +34,6 @@ class FrameConversionMixin:
index=np.random.rand(9),
)
- @property
- def df_pair(self):
- pdf = self.pdf
- psdf = ps.from_pandas(pdf)
- return pdf, psdf
-
def test_astype(self):
psdf = self.psdf
diff --git a/python/pyspark/pandas/tests/frame/test_reindexing.py
b/python/pyspark/pandas/tests/frame/test_reindexing.py
index 606efd95188..b3639945391 100644
--- a/python/pyspark/pandas/tests/frame/test_reindexing.py
+++ b/python/pyspark/pandas/tests/frame/test_reindexing.py
@@ -30,19 +30,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
# This file contains test cases for 'Reindexing / Selection / Label
manipulation'
#
https://spark.apache.org/docs/latest/api/python/reference/pyspark.pandas/frame.html#reindexing-selection-label-manipulation
class FrameReindexingMixin:
- @property
- def pdf(self):
- return pd.DataFrame(
- {"a": [1, 2, 3, 4, 5, 6, 7, 8, 9], "b": [4, 5, 6, 3, 2, 1, 0, 0,
0]},
- index=np.random.rand(9),
- )
-
- @property
- def df_pair(self):
- pdf = self.pdf
- psdf = ps.from_pandas(pdf)
- return pdf, psdf
-
def test_add_prefix(self):
pdf = pd.DataFrame({"A": [1, 2, 3, 4], "B": [3, 4, 5, 6]},
index=np.random.rand(4))
psdf = ps.from_pandas(pdf)
diff --git a/python/pyspark/pandas/tests/frame/test_spark.py
b/python/pyspark/pandas/tests/frame/test_spark.py
index 4413279e32f..36466695c30 100644
--- a/python/pyspark/pandas/tests/frame/test_spark.py
+++ b/python/pyspark/pandas/tests/frame/test_spark.py
@@ -43,12 +43,6 @@ class FrameSparkMixin:
index=np.random.rand(9),
)
- @property
- def df_pair(self):
- pdf = self.pdf
- psdf = ps.from_pandas(pdf)
- return pdf, psdf
-
def test_empty_dataframe(self):
pdf = pd.DataFrame({"a": pd.Series([], dtype="i1"), "b": pd.Series([],
dtype="str")})
diff --git a/python/pyspark/pandas/tests/frame/test_take.py
b/python/pyspark/pandas/tests/frame/test_take.py
index 28d20e9bd99..3654436848b 100644
--- a/python/pyspark/pandas/tests/frame/test_take.py
+++ b/python/pyspark/pandas/tests/frame/test_take.py
@@ -16,7 +16,6 @@
#
import unittest
-import numpy as np
import pandas as pd
from pyspark import pandas as ps
@@ -25,19 +24,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
class FrameTakeMixin:
- @property
- def pdf(self):
- return pd.DataFrame(
- {"a": [1, 2, 3, 4, 5, 6, 7, 8, 9], "b": [4, 5, 6, 3, 2, 1, 0, 0,
0]},
- index=np.random.rand(9),
- )
-
- @property
- def df_pair(self):
- pdf = self.pdf
- psdf = ps.from_pandas(pdf)
- return pdf, psdf
-
def test_take(self):
pdf = pd.DataFrame(
{"A": range(0, 50000), "B": range(100000, 0, -2), "C":
range(100000, 50000, -1)}
diff --git a/python/pyspark/pandas/tests/frame/test_time_series.py
b/python/pyspark/pandas/tests/frame/test_time_series.py
index eed9086ada7..61dc095d6ba 100644
--- a/python/pyspark/pandas/tests/frame/test_time_series.py
+++ b/python/pyspark/pandas/tests/frame/test_time_series.py
@@ -28,19 +28,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
# This file contains test cases for 'Time series-related'
#
https://spark.apache.org/docs/latest/api/python/reference/pyspark.pandas/frame.html#time-series-related
class FrameTimeSeriesMixin:
- @property
- def pdf(self):
- return pd.DataFrame(
- {"a": [1, 2, 3, 4, 5, 6, 7, 8, 9], "b": [4, 5, 6, 3, 2, 1, 0, 0,
0]},
- index=np.random.rand(9),
- )
-
- @property
- def df_pair(self):
- pdf = self.pdf
- psdf = ps.from_pandas(pdf)
- return pdf, psdf
-
def test_shift(self):
pdf = pd.DataFrame(
{
diff --git a/python/pyspark/pandas/tests/frame/test_truncate.py
b/python/pyspark/pandas/tests/frame/test_truncate.py
index 69590cd5021..c6813de4a5f 100644
--- a/python/pyspark/pandas/tests/frame/test_truncate.py
+++ b/python/pyspark/pandas/tests/frame/test_truncate.py
@@ -16,7 +16,6 @@
#
import unittest
-import numpy as np
import pandas as pd
from pyspark import pandas as ps
@@ -25,19 +24,6 @@ from pyspark.testing.sqlutils import SQLTestUtils
class FrameTruncateMixin:
- @property
- def pdf(self):
- return pd.DataFrame(
- {"a": [1, 2, 3, 4, 5, 6, 7, 8, 9], "b": [4, 5, 6, 3, 2, 1, 0, 0,
0]},
- index=np.random.rand(9),
- )
-
- @property
- def df_pair(self):
- pdf = self.pdf
- psdf = ps.from_pandas(pdf)
- return pdf, psdf
-
def test_truncate(self):
pdf1 = pd.DataFrame(
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]