Reputation: 1082
raw data
question
how can I replace industryName with tradeDate and remove that blank row? I want to make it look like:
the screenshot below is created by IPython-Dashboard
Upvotes: 1
Views: 153
Reputation: 6383
You can reset_index
to convert you index to a regular column.
data_pivot.reset_index()
Upvotes: 1
Reputation: 109528
tradeDate
is the name of your index. You can remove it via:
data_pivot.index.name = None
industryName
is the name of your columns. You can change that be equal to tradeDate
via:
data_pivot.columns.name = 'tradeDate'
Upvotes: 1