Pandas column contains a series of urls. I'd like to extract a substring from the url.
MRE code below.
s = pd.Series(['https://url-location/img/xxxyyy_image1.png'])
s.apply(lambda x: x[x.find("/")+1:st.find("_")])
I'd like to extract xxxyyy and store them into a new column.