I have got DataFrame with lists:
deviceId timeInMilliseconds callState \
0 e4774cdda0793f86414e8b9140bb6db4 1455233230229 CALL_STATE_OFFHOOK
1 e4774cdda0793f86414e8b9140bb6db4 1455233232239 CALL_STATE_IDLE
2 270c1b084f3f146eb5787075158d9c53 1455233316723 CALL_STATE_OFFHOOK
3 270c1b084f3f146eb5787075158d9c53 1455233324391 CALL_STATE_IDLE
4 270c1b084f3f146eb5787075158d9c53 1455234721731 CALL_STATE_OFFHOOK
number numberType time data day_of_the_week \
0 609665996 0 00:27:10 2016-02-12 5
1 609665996 0 00:27:12 2016-02-12 5
2 126301484 1 00:28:36 2016-02-12 5
3 126301484 1 00:28:44 2016-02-12 5
4 126301484 1 00:52:01 2016-02-12 5
I want to get all data from those DataFrame when callState is equal to CALL_STATE_IDLE.
I tried like that:
data_all = [x for x in data if (x['callState'] == 'CALL_STATE_IDLE') ]
but I have 'TypeError: string indices must be integers'.
Could you help me please?