pandas print nonzero in series

53

>>> s = pd.Series([0, 3, 0, 4])

>>> s.iloc[s.nonzero()[0]]
1    3
3    4
dtype: int64

Comments

Submit
0 Comments