This is my interpretation of the question...
Give the data file z.csv (export your data from excel into a csv file)
"Blood lymphocytes from cancer","Blood lymphocytes from sausages","Ovarian tumor_Grade III"
"Blood lymphocytes from patients","Ovarian tumor_Grade III","Peritoneum tumor_Grade IV"
"Ovarian tumor_Grade III","Peritoneum tumor_Grade IV","Hormone resistant PCA"
"Peritoneum tumor_Grade XV","Hormone resistant PCA","Blood lymphocytes from cancer"
"Hormone resistant PCA",,"Blood lymphocytes from patients"
This program finds the sentences common to all the columns
import csv
# Open the csv file
rows = csv.reader(open("z.csv"))
# A list of 3 sets of sentences
results = [set(), set(), set()]
# Read the csv file into the 3 sets
for row in rows:
for i, data in enumerate(row):
results[i].add(data)
# Work out the sentences common to all rows
intersection = results[0]
for result in results[1:]:
intersection = intersection.intersection(result)
print "Common to all rows :-"
for data in intersection:
print data
And it prints this answer
Common to all rows :-
Hormone resistant PCA
Ovarian tumor_Grade III
Not 100% sure that is what you are looking for but hopefully it gets you started!
It could be generalised easily to as many columns as you like, but I didn't want to make it more complicated