I have the following code:
A = pd.DataFrame([[1, 2], [1, 3], [4, 6]], columns=[['att1', 'att2']])
A['idx'] = ['a', 'b', 'c']
A
which works fine until I do (trying to set column 'idx' as in index for the dataframe)
A.set_index('idx', inplace=True)
which throws an error
TypeError: only integer scalar arrays can be converted to a scalar index
What does this mean ?