[소스코드]
# -- coding: utf-8 --
"""
Created on Sun May 30 01:12:21 2021
@author: raven90
"""
from pandas import DataFrame
data = [
["보고서1 2017.02", 412453],
["정기보고서 2016.05", 2343423],
["중간보고서 2015.11", 23123],
["첨부 2015.08", 5453],
["첨부2 2015.09", 234133],
]
columns = ["A", "B"]
df = DataFrame(data=data, columns=columns)
#참고 : https://www.delftstack.com/ko/howto/python-pandas/pandas-get-index-of-row/
print ('인덱스 =', df.index[df['A'].str.contains('2015.11')].tolist())
print (df.loc[df['A'].str.contains('2015.11')])
[실행결과 캡쳐]