I have a question related to the df['columnA'].value_counts()
method and a previous post here: Count frequency of values in pandas DataFrame column
Take this example DataFrame:
fake_data = {'columnA': ['XAVY', 'XAVY', 'XAVY', 'XAVY', 'XAVY', 'AXYV', 'AXYV', 'AXYV', 'AXYV', 'AXYV', 'AXYV']}
df = pd.DataFrame(fake_data, columns = ['columnA'])
df
I am trying to determine the frequency of each letter (X,A,V,Y) at each position in the string in this column.
In this example, position 0 would be 54% A, 46% X, position 3 would be 46% Y, 54% V...and so on.