You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (Jira)" <ji...@apache.org> on 2021/11/04 06:25:00 UTC
[jira] [Updated] (SPARK-37184) pyspark.pandas should support
DF["column"].str.split("some_suffix").str[0]
[ https://issues.apache.org/jira/browse/SPARK-37184?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hyukjin Kwon updated SPARK-37184:
---------------------------------
Parent: SPARK-37197
Issue Type: Sub-task (was: Improvement)
> 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: Sub-task
> Components: PySpark
> Affects Versions: 3.2.0
> Reporter: Chuck Connell
> Priority: Major
>
> 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