Dataframe replace - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Data Science (https://python-forum.io/forum-44.html) +--- Thread: Dataframe replace (/thread-21615.html) |
Dataframe replace - ilcaa72 - Oct-07-2019 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='') |