Skip to content

Conversation

@itholic
Copy link
Contributor

@itholic itholic commented Aug 11, 2020

Series.first_valid_index() and DataFrame.first_valid_index() raise Exception for Empty set - but it supposed to return None, not raise Error. -

>>> ks.Series([]).first_valid_index()  # It should return `None`.
Traceback (most recent call last):
...
TypeError: 'NoneType' object is not subscriptable

This PR fixed this and added related tests.

>>> ks.Series([]).first_valid_index() is None
True

@ueshin
Copy link
Collaborator

ueshin commented Aug 19, 2020

Thanks! merging.

@ueshin ueshin merged commit bbfe307 into databricks:master Aug 19, 2020
@itholic itholic deleted the fix_first_valid_index branch August 24, 2020 03:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants