Jul-22-2020, 02:13 PM
Hello,
I need to find the string inside TFile, and once the string is located I need to return the string 9 cells below it. TFile contains only one column. I'm not sure if I'm on the right path here, or totally off. I'm not sure how to go about what to add under if StringFound. I just know if string is found return string 9 cells down.
I need to find the string inside TFile, and once the string is located I need to return the string 9 cells below it. TFile contains only one column. I'm not sure if I'm on the right path here, or totally off. I'm not sure how to go about what to add under if StringFound. I just know if string is found return string 9 cells down.
TFile=pd.read_excel(Train, usecols="B") String=pd.read_excel(input_file, usecols="A",nrows=1,header=None,squeeze=True).str.slice(start=28,stop=-2).to_string(index=False).strip() def FindXlCell(String): StringFound = FindXlCell(String, TFile.iter_rows(min_col=1, max_col=1)) if StringFound: