pyspark.pandas.DataFrame.ne

DataFrame.ne(other: Any) → pyspark.pandas.frame.DataFrame[source]

Compare if the current value is not equal to the other.

>>> df = ps.DataFrame({'a': [1, 2, 3, 4],
...                    'b': [1, np.nan, 1, np.nan]},
...                   index=['a', 'b', 'c', 'd'], columns=['a', 'b'])
>>> df.ne(1)
       a      b
a  False  False
b   True   True
c   True  False
d   True   True