How to replace the last entry in each line of the dataframe, the line has the form ADVA.SFP / 2G5U / D1549.32U / SM / LC # D20.SFP. You need to replace the first '.' and the last '.' . Point in the center must be left. Replaced the first point with '$' -
import pandas as pd file = pd.read_excel('Stock_base.xlsx', sep=';', encoding='cp1251') file['Pos'] = file['pos'].str.replace('.', '$', 1)