DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
create new column with first character of string pyspark
df = df.withColumn("first_n_char", df.colname.substr(1))
Source by www.datasciencemadesimple.com #
PREVIOUS
NEXT
Tagged:
#create
#column
#character
#string
#pyspark
ADD COMMENT
Topic
COMMENT
Name
9+7 =
Submit