W3cubDocs

/pandas 0.25

pandas.Series.compress

Series.compress(self, condition, *args, **kwargs) [source]

Return selected slices of an array along given axis as a Series.

Deprecated since version 0.24.0.

Returns:
Series

Series without the slices for which condition is false.

© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.25.0/reference/api/pandas.Series.compress.html