I worked with an array and named rows as elements in a column [1]
free.index = free[1]
free
Next step, I wanted to delete column[1]
free = free.drop(1, axis=1, inplace=True)
free
The result is
AttributeError Traceback (most recent call last)
<ipython-input-24-1a43fda6165c> in <module>
----> 1 free = free.drop(1, axis=1, inplace=True)
2 free
AttributeError: 'NoneType' object has no attribute 'drop'
The same is then I write
free.columns
How an error could be avoid?