Resources
Answers
Examples
Sign in
Get Started
What do you want to save?
Add Code snippet
New code examples
Python
2022-02-12 02:15:01
how to call column name with space in python
df.columns = df.columns.str.strip().str.lower().str.replace(' ', '_').str.replace('(', '').str.replace(')', '')
Add solution
Python
2021-11-21 03:45:30
Standardizing column names pandas
df.columns = df.columns.str.strip().str.lower().str.replace(' ', '_').str.replace('(', '').str.replace(')', '')
Add solution
Python
2021-11-02 20:44:14
replace values of pandas column
df['column'] = df['column'].str.replace(',','-') df
Add solution
Python
2021-11-02 15:31:23
pandas replace word begins with contains
df['sport'] = df.sport.str.replace(r'(^.*ball.*$)', 'ball sport') df
Add solution
Python
2021-11-02 11:25:10
remove non-alphabetic pandas python
import pandas as pd ded = pd.DataFrame({'strings': ['a#bc1!', 'a(b$c']}) ded.strings.str.replace('[^a-zA-Z0-9]', '')
Add solution
Python
2021-10-20 19:46:13
Python function remove all whitespace from all character columns in dataframe
df.columns = df.columns.str.replace(' ', '')
Add solution
Python
2021-09-22 08:01:03
remove comma from string python column
df['x']=df['x'].str.replace(',','')
Add solution
Python
2021-09-13 01:54:03
pandas remove char from column
df['result'] = df['result'].str.replace(r'\D', '') df time result 1 09:00 52 2 10:00 62 3 11:00 44 4 12:00 30 5 13:00 110
Add solution
Best helpers
daily
weekly
monthly
for 3 months
Ranking is empty
This website uses cookies to make IQCode work for you. By using this site, you agree to our
cookie policy
Welcome Back!
Sign up to unlock all of IQCode features:
Test your skills and track progress
Engage in comprehensive interactive courses
Commit to daily skill-enhancing challenges
Solve practical, real-world issues
Share your insights and learnings
Sign in
E-mail
Password
Recover lost password
Log in
Or log in with
Not registered?
Sign up takes less than a minute
Create a Free Account
Sign up to unlock all of IQCode features:
Test your skills and track progress
Engage in comprehensive interactive courses
Commit to daily skill-enhancing challenges
Solve practical, real-world issues
Share your insights and learnings
Sign up
Email
Password
Sign up for free
Or sign up with
By signing up, you agree to the
Terms and Conditions
and
Privacy Policy
. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.