I have a webscraped data that needs to be cleaned please For values that is divided by character "-" I want to keep the value before the character "-". For values like 5000000R (4000000)R, I want to keep the first value before the ones in parentensis. And I also want to get rid of the extra characters like "IN", "R". i am using pandas dataframe
- The Overflow Blog
-
- Featured on Meta
-
-
-
Hot Network Questions
- Can there be a continuous function with infinite derivative everywhere?
- Was the second copy of the FAT ever used for anything?
- Complete the integer sequence: 10, 11, 12, 13, 14, 20, ?, ?, ?, ?
- Button naming convention for web app buttons that open view/edit modals
- Graph of a relation
- Rumor that Socrates helped Euripides with his plays?
- Plane accelerate in stationary air vs stationary plane in accelerating airflow?
- Configuring NFS4 for maximum reliability with SQLite
- News API in Python - Take II
- Why can’t I delete files from USB drive mounted over a CIFS share?
- How to use ISO 8601 dates in a sentence?
- Crossing a square pond with beams
- How do I work better with a younger colleague
- Binary encoding with short bit sequences
- Not detained but not free to go
- Did Microsoft Windows popularize Klondike solitaire?
- Base codes with transversal non-Clifford - why not?
- How to Cap a Mixed Metal Gas Line
- Short story: jumping to/from FTL travel affects body and mind at different rates
- What is the power of the purse?
- Advice for approaching a co-advisor
- What was J. J. Connington's mistake about the telephone-bell in “The Case With Nine Solutions”?
- Is there a construction of the Everywhere doubled line for which homogeneity is apparent in the representation?
- Are indexes always unitless?
lang-py

df['your_col'].str.extract(r'(\d+)'). If you have a more complex logic, make sure to provide a reproducible example and the matching expected output.