def mostFrequentWord(words):
# Taking empty list
lis = []
for i in words:
# Getting all words
for j in i.split():
lis.append(j)
# Calculating frequency of all words
freq = Counter(lis)
# find max count and print that key
max = 0
for i in freq:
if (freq[i] > max):
max = freq[i]
word = i
return word, max
df['source'] = df['source'].apply(lambda row: mostFrequentWord(words)[0] in row)
print(df['source']==True)
UnsupportedClassVersionError: controllers/HomeController has been compiled by a more recent version of the Java Runtime (class file version 60.0), this version of the Java Runtime only recognizes class file versions up to 52.0