Examples
import numpy as np
import pandas as pd
s = pd.Series(['p', 'pq', 'pqr', 'pqsr', 'pqrst'])
s
Specify just start, meaning replace start until the end of the string with repl.
s.str.slice_replace(1, repl='A')
Specify just stop, meaning the start of the string to stop is replaced with repl, and the rest
of the string is included.
s.str.slice_replace(stop=2, repl='A')
Specify start and stop, meaning the slice from start to stop is replaced with repl.
Everything before or after start and stop is included as is.
s.str.slice_replace(start=1, stop=3, repl='A')