根据列中的列表长度删除熊猫行

时间:2018-10-16 14:49:20

标签: python pandas dataframe series

我有一个pandas数据框,其中一列包含类似值的列表

df = pd.DataFrame({'A': [11,22,33],
               'B': [[4,5],[10,11,12], []]})

现在,我想在“ B”列中删除所有包含空列表的行,有人可以帮忙吗?谢谢

1 个答案:

答案 0 :(得分:1)

使用@Autowired

import * as oAuth from 'google-oauth-jwt';

oAuth.authenticate(
    {
        email: 'myClientMail',
        key: 'myPrivateKey',
        scopes: ['https://www.googleapis.com/auth/cloud-platform']
    },
    (err, token) => {
        console.log('token: ', token);
    }
);

str.len
相关问题