You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Chuck Connell (Jira)" <ji...@apache.org> on 2021/11/01 19:12:00 UTC
[jira] [Created] (SPARK-37184) pyspark.pandas should support
DF["column"].str.split("some_suffix").str[0]
Chuck Connell created SPARK-37184:
-------------------------------------
Summary: pyspark.pandas should support DF["column"].str.split("some_suffix").str[0]
Key: SPARK-37184
URL: https://issues.apache.org/jira/browse/SPARK-37184
Project: Spark
Issue Type: Improvement
Components: PySpark
Affects Versions: 3.2.0
Reporter: Chuck Connell
In regular pandas you can say
{quote}DF["column"] = DF["column"].str.split("suffix").str[0]
{quote}
In order to strip off a suffix.
With pyspark.pandas, this syntax does not work. You have to say something like
{quote}DF["column"] = DF["column"].str.replace("suffix", '', 1)
{quote}
which works fine if the suffix only appears once at the end, but is not really the same.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org