擅长:python、mysql、java
<p>您是否愿意将格式更改为另一种格式,或者有一个单独的列,列中的日期可供您的critieria搜索?我写了这个解决方案,展示了这条路线,也许它会帮助你的想法,我愿意接受改变的建议:</p>
<pre><code>newdf = pd.read_csv('testdata2.csv', parse_dates=["Date"], date_parser=lambda x: pd.to_datetime(x, format="%a %m/%d"),
index_col="Date")
newdf = newdf.reset_index()
newdf['Date'] = newdf['Date'].mask(newdf['Date'].dt.year == 1900, newdf['Date'] + pd.offsets.DateOffset(year=2019))
newdf[(newdf['Date'] > '2019-11/10')]
#Out[63]:
# Date OPP Result
#0 2019-11-16 @DAL L110-102
#1 2019-11-13 @POR W114-106
#2 2019-11-11 @LAC L98-88
</code></pre>