What I am trying to do is add a search feature into a dataframe. I want to be able to type a file name and save the row it was found true. That way when I use iloc it will return the "filename" and "modified_data" together.
import pandas as pd
#....
df = pd.DataFrame(data, columns=['filename', 'modified_date'])
if df['filename'].str.contains('AAROW PDM Report') == TRUE:
RowValue = #I want it to be equal to the row that was found true
print(df.iloc[[RowValue]])
Try:
RowValue = df['filename'].str.contains('AAROW PDM Report').idxmax()