Add import to resolve changes in new versions of python

This commit is contained in:
Timothy Ubbens 2018-10-15 23:22:34 -04:00
parent cb12952d60
commit a5b7fe9e61

View File

@ -186,6 +186,8 @@ rx = re.compile(r'\d+$') # match trailing digits
- http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.html
"""
from functools import reduce
def extractYear(v):
return(pd.Series(reduce(lambda x, y: x + y, map(rx.findall, v), [])).astype(int))