I am new to Pandas.
I have and excel file with 10 sheets in it. I am trying to achieve this.
As no answers were provided on that question I am going to use this method to check if a string in a DataFrame row contains a word from excel sheet:
file = pd.read_excel(open('config_values.xlsx', 'rb'),
sheet_name='ContainsFree')
Join all rows in excel sheet using
first_sheet = '|'.join(file)
Using :
df['Contains Language'] = df.Search_Query.str.contains(first_sheet, regex=True)
However, when I use '|'.join(file)
I get the first row of the excel sheet rather than the joined string:
excel_sheet_1
gratuit
free
gratis
...
After '|'join.(file)
I get:
gratuit
Expected:
gratuit|free|gratis
What am I doing wrong in order to join all rows in an excel sheet?
Thank you for your suggestions.