DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
pandas replace substring in column names
df.columns = df.columns.astype(str).str.replace("[()]", "_")
Source by app.dataquest.io #
PREVIOUS
NEXT
Tagged:
#pandas
#replace
#substring
#column
#names
ADD COMMENT
Topic
COMMENT
Name
9+1 =
Submit