In the image below, bd is the dataframe whose type is pandas.core.frame.DataFrame I'm using Pandas for this. Thanks in advance.
[enter image description here][1]
In the image below, bd is the dataframe whose type is pandas.core.frame.DataFrame I'm using Pandas for this. Thanks in advance.
[enter image description here][1]
You can use re
module and replace both year and years with empty string:
df[3] = df[3].apply(lambda x: re.sub('\syear(s?)', '', x))