0

I have

Alpha. Beta.
ZUP9W----GU3 128374
UI09--12D 1219313

I NEED:

Alpha. Beta. Gamma
ZUP9W----GU3 128374 ZUP9WGU3
UI09--12D 1219313 UI0912D

Basically a new column Gamma with values of column A without the hypens.

Thank you=)

Henry Ecker
  • 34,399
  • 18
  • 41
  • 57
Dilan
  • 25
  • 3
  • 1
    [str.replace](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.str.replace.html) -> `df['Gamma'] = df['Alpha.'].str.replace('-', '')` – Henry Ecker Jul 06 '21 at 21:14
  • Very similar to [How do i replace all instances of a dash (-) with the number zero (0) in the middle of a string in pandas dataframe?](https://stackoverflow.com/q/58562017/15497888) and an extensive list of methods is here [Remove unwanted parts from strings in a column](https://stackoverflow.com/q/13682044/15497888) – Henry Ecker Jul 06 '21 at 21:20

0 Answers0