Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dataframe replace
#1
i have a dataframe that has rows like. i want to get rid of various markings like =, |, ()

i wrote this but it returns the same value without removing

['2 team name = 27.92 4 0 0 20.25( 18) 0 0 0 | 1 0 0 | 27.03 2 | 28.55 2 | 28.35 2 (region west)']

df.replace(to_replace=[ '|', '(' ,')' ,'=' ], value='')
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PANDAS: DataFrame | Replace and others questions moduki1 2 1,794 Jan-10-2022, 07:19 PM
Last Post: moduki1
  Question for dataframe to replace INF value zydjohn 0 5,142 Jan-15-2018, 10:00 PM
Last Post: zydjohn

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020