Suppose we have a pandas Series of lists where each list contains some characteristics described as strings like this:
0 ["A", "C", "G", ...]
1 ["B", "C", "H", ...]
2 ["A", "X"]
N ["J", "K", ...]
Since I already wrote the code for the image in my comment, and Ed seems to have the same interpretation of your question as I do, I'll go ahead and add my solution.
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import string M, N = 100, 10 letters = list(string.ascii_uppercase) data = np.random.choice(letters, (M, N)) df = pd.DataFrame(data) # Get frequency of letters in each column using pd.value_counts df_freq = df.apply(pd.value_counts).T # Plot frequency dataframe with seaborn heatmap ax = sns.heatmap(df_freq, linewidths=0.1, annot=False, cbar=True) plt.show()