IonK created SPARK-42751:
----------------------------
Summary: Pyspark.pandas.series.str.findall can't handle tuples
that are returned by regex
Key: SPARK-42751
URL: https://issues.apache.org/jira/browse/SPARK-42751
Project: Spark
Issue Type: Bug
Components: Pandas API on Spark
Affects Versions: 3.3.2
Reporter: IonK
When you use the str.findall accessor method on a ps.series and you're passing
a regex pattern that will return match groups, it will return a pyarrow data
error.
In pandas the result is this:
{code:java}
df.to_pandas()[col].str.findall(regex_pattern, flags=re.IGNORECASE)
returns
[("value", , , , )],
[("value", , , , )],
[(, , ,value , )]{code}
In pyspark.pandas the result is:
org.apache.spark.api.python.PythonException: 'pyarrow.lib.ArrowTypeError:
Expected bytes, got a 'tuple' object'.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]