Return the last non-NA elements in this array along the given axis
(values, axis, skipna=None)
| 834 | |
| 835 | |
| 836 | def last(values, axis, skipna=None): |
| 837 | """Return the last non-NA elements in this array along the given axis""" |
| 838 | if (skipna or skipna is None) and not ( |
| 839 | dtypes.isdtype(values.dtype, "signed integer") or dtypes.is_string(values.dtype) |
| 840 | ): |
| 841 | # only bother for dtypes that can hold NaN |
| 842 | if is_chunked_array(values): |
| 843 | return chunked_nanlast(values, axis) |
| 844 | else: |
| 845 | return nputils.nanlast(values, axis) |
| 846 | |
| 847 | return take(values, -1, axis=axis) |
| 848 | |
| 849 | |
| 850 | def isin(element, test_elements, **kwargs): |
searching dependent graphs…