How can I obtain the element-wise logical NOT of a pandas Series?

To invert a boolean Series, use ~s: In [7]: s = pd.Series([True, True, False, True]) In [8]: ~s Out[8]: 0 False 1 False 2 True 3 False dtype: bool Using Python2.7, NumPy 1.8.0, Pandas 0.13.1: In [119]: s = pd.Series([True, True, False, True]*10000) In [10]: %timeit np.invert(s) 10000 loops, best of 3: 91.8 µs per … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)