Define a column type as 'list' in Pandas
It seems to me that you are building a wrong data model.The model is not in 1st normal form (1NF) and you will have many troubles using it.Please, try to use a normalized model.
Brand price0 Nike 50.01 Nike 60.02 Nike 70.03 Puma 30.04 Puma 100.0
You can get any computed value from this model with ease.
You can use your brands as column names:
import pandas as pddf = pd.DataFrame({'Nike' : [[1,5,198,0,0,35],[0.5,0.3,0.2]]},index = ['count','floats'])
and then you can add new brands like this:
df['Puma'] = [[1,2,3],[0.1,0.2]]
You will obtain this dataframe:
Nike Pumacount [1, 5, 198, 0, 0, 35] [1, 2, 3]float [0.5, 0.3, 0.2] [0.1, 0.2]
Then accessing the values is really simple.