import pandas as pd
df = pd.read_csv('data.txt', sep='[ _]', header=None, names=['name',
    'property', 'year', 'value'])
means = df.groupby(['name', 'property'])['value'].mean()
calculate mean using numpy ndarray