Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TabularData: Add dropna method #6812

Merged
merged 1 commit into from
Oct 29, 2021
Merged

TabularData: Add dropna method #6812

merged 1 commit into from
Oct 29, 2021

Conversation

daavoo
Copy link
Contributor

@daavoo daavoo commented Oct 15, 2021

This is a pre-requisite for #4455

@daavoo daavoo requested a review from a team as a code owner October 15, 2021 09:40
@daavoo daavoo requested a review from pared October 15, 2021 09:40
@pared
Copy link
Contributor

pared commented Oct 15, 2021

@daavoo can you provide some context, where this functionality will be used?

@daavoo
Copy link
Contributor Author

daavoo commented Oct 15, 2021

@daavoo can you provide some context, where this functionality will be used?

Sure. sorry about that. I will provide context in #4455

@daavoo daavoo self-assigned this Oct 25, 2021
This method mimics pandas `dropna`.
@daavoo daavoo force-pushed the tabulardata-dropna branch from fc5c0f3 to cc4cba4 Compare October 27, 2021 18:25
@daavoo daavoo changed the title Added dropna to TabularData TabularData: Add dropna method Oct 27, 2021
@@ -181,6 +182,35 @@ def as_dict(
{k: self._columns[k][i] for k in keys} for i in range(len(self))
]

def dropna(self, axis: str = "rows"):
Copy link
Contributor

@karajan1001 karajan1001 Oct 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about adding a new argument how : {‘any’, ‘all’}. Not required for this PR. Other useful arguments are subset that would protect some important columns / rows.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats a good idea and would be in line with pandas API

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just borrows ideas from Pandas, but Pandas is too heavy for this work.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't subset be effectively making --include overriding drop?

@efiop efiop merged commit 24abc6f into master Oct 29, 2021
@efiop efiop deleted the tabulardata-dropna branch October 29, 2021 12:28
@skshetry skshetry added the skip-changelog Skips changelog label Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Skips changelog
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants