Assume, I have following pivoted DataFrame:
| ID | 0 | 1 | 2 |
| 0 |
|-----:|----:|----:|----:|
| 1115 | nan | "YE"| nan |
| 1590 | nan | "He"| "NO"|
How can I remove this 0
column, so that I get this representation:
| ID | 0 | 1 | 2 |
|-----:|----:|----:|----:|
| 1115 | nan | "YE"| nan |
| 1590 | nan | "He"| "NO"|
Note: It is not a row.
EDIT:
Index:
df.index
Int64Index([ 0, 2],
dtype='int64', name=0, length=3)
Columns:
df.columns
Int64Index([ 0, 1, 2],
dtype='int64', name='ID', length=3)