Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pandas replace substring in column names

df.columns = df.columns.astype(str).str.replace("[()]", "_")
Comment

PREVIOUS NEXT
Code Example
Python :: add text to plot python scatter 
Python :: python fill a list 
Python :: python get value from decimal object 
Python :: relu function python 
Python :: python path from string 
Python :: python creating a dict from a string 
Python :: python datetime day of year 
Python :: make blinking text python1 
Python :: Dropping NaN in dataframe 
Python :: remove a file or dir in linux or mac or ubuntu 
Python :: get index of highest value in array python 
Python :: check if camera is being used python 
Python :: add time to datetime python 
Python :: pandas add list to dataframe as column 
Python :: np.array to list 
Python :: pathlib path python 
Python :: pyserial example code 
Python :: logistic regression algorithm in python 
Python :: python copy variable 
Python :: when was python created 
Python :: open and read a file in python 
Python :: python color text 
Python :: python sort two key 
Python :: remove duplicates function python 
Python :: The Python path in your debug configuration is invalid. 
Python :: python loop list from last to first 
Python :: install imgkit py 
Python :: python program to convert unit 
Python :: Python Requests Library Get Method 
Python :: python tkinter getting labels 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =