DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
take substring of every element in dataframe
df['col'] = df['col'].str[:9]
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#substring
#element
#dataframe
ADD COMMENT
Topic
COMMENT
Name
6+5 =
Submit