Python: The index of dataframe is a combination of three columns, how to separate them?

Viewed 114

I have a dataframe looks like below.

The index is a combination of three variables: "Date", "Time", and "Status".

I have two questions:

1) Can I convert this index into three general columns?

2) Can I combine "Date" and "Time" together as a new time series index?

Dataframe example

 in[19]: mydf
Out[19]: 
                                   Entry        Exit
Date     Time     Status                            
01-01-13 03:22:00 REGULAR     57308825.0  43088232.0
         07:22:00 REGULAR     57309553.0  43088773.0
         11:22:00 REGULAR     57310969.0  43089369.0
         15:22:00 REGULAR     57313168.0  43090433.0
         19:22:00 REGULAR     57315755.0  43092329.0
         23:22:00 REGULAR     57317073.0  43093590.0
01-02-13 03:22:00 REGULAR     57317475.0  43094076.0
         07:22:00 REGULAR     57319975.0  43094558.0
         07:37:45 DOOR OPEN    1524176.0    672377.0
         07:37:46 DOOR CLOSE   1524176.0    672377.0
         11:22:00 REGULAR     57326441.0  43097377.0
         15:22:00 REGULAR     57331818.0  43100057.0
         19:22:00 REGULAR     57337786.0  43103918.0
         23:22:00 REGULAR     57339290.0  43105700.0
01-03-13 03:22:00 REGULAR     57339676.0  43106258.0
         07:22:00 REGULAR     57342339.0  43106791.0
         09:37:39 REGULAR     23317856.0  15286811.0
         11:22:00 REGULAR     57349205.0  43109943.0
         15:22:00 REGULAR     57354752.0  43112434.0
         15:22:01 DOOR OPEN       4558.0         0.0
         15:27:12 LOGON           4558.0         0.0
         15:28:04 LGF-MAN         4558.0         0.0
         15:28:07 DOOR CLOSE      4558.0         0.0
         15:28:08 DOOR OPEN       4558.0         0.0
         15:28:21 DOOR CLOSE      4558.0         0.0
         18:25:09 DOOR OPEN    7171535.0   2420826.0
         18:27:14 DOOR CLOSE   7171535.0   2420826.0
         18:27:42 DOOR OPEN    7171535.0   2420826.0
         18:27:44 DOOR CLOSE   7171535.0   2420826.0
         18:27:45 DOOR OPEN    7171535.0   2420826.0
2 Answers
Related