I want to set a cell value as a list. Say for example:
df.loc['a']['b'] = ['one', 'two', 'three']
However, I'm unable to do so as I get the following error:
ValueError: Must have equal len keys and value when setting with an iterable
My dataframe currently is just all zeros and is nxn. Is there any way to be able to set the cell value so that when I execute df.loc['a']['b']
, I get back ['one', 'two', 'three']
.