datefinder

making output of datefinder into list

喜欢而已 提交于 2019-12-11 16:07:13
问题 import datefinder import pandas as pd s = "entries are due by January 4th, 2017 at 8:00pm. created 01/15/2005 by ACME Inc. and associates. here Dec. 24th, 1981 at 6pm." match = datefinder.find_dates(s) for m in match: print(m) 2017-01-04 20:00:00 2005-01-15 00:00:00 1981-12-24 18:00:00 The above works using datefinder to find dates in string. For example, January 4th, 2017 at 8:00pm is grabbed from s and is converted into 2017-01-04 20:00:00 . Now I simply want to get the output print(m) and

How do I turn datefinder output into a list?

帅比萌擦擦* 提交于 2019-12-11 15:27:58
问题 So this has been answered here: making output of datefinder into list Unfortunately my rep is too low so I can't comment to get clarity on why it's not functioning as expected. I want to take filename strings and turn them into a list of dates so that I can then use them as a fill for the date column. All of the filenames include event dates, but they are not on the sheets themselves. The format is: CompanyNameEventLocationDDMMYYYY.xlsx import glob import datefinder #get all Excel files

Datefinder Module Stranger behavior on particular string

我只是一个虾纸丫 提交于 2019-12-11 03:12:41
问题 I have two strings: s1 = 'Agreement dated on March 9, 2007' s2 = 'Agreement signed on March 9, 2007' I run below code on the string import datefinder matches =datefinder.find_dates(s1) ## or s2 for match in matches: print (match) s2 gives me desired result but s1 doesn't as it contains the word dated. P.S. I have used datefinder as I had multiple date formats and hence need to write multiple regex. This worked well just for this exception Any idea why this strange behavior? 回答1: It's not a