Skip to content

feat: Add support for DataFrame.clear method #2896

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

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

FBruzzesi
Copy link
Member

@FBruzzesi FBruzzesi commented Jul 26, 2025

What type of PR is this? (check all applicable)

  • 💾 Refactor
  • ✨ Feature
  • 🐛 Bug Fix
  • 🔧 Optimization
  • 📝 Documentation
  • ✅ Test
  • 🐳 Other

Related issues

Checklist

  • Code follows style guide (ruff)
  • Tests added
  • Documented the changes

If you have comments or can explain your changes, please do so below

Opening as draft since we need to decide what to do for the cases in which the original dtype is non nullable for pandas (see #2890 (comment))

@dangotbanned
Copy link
Member

I hope its okay I linked the polars PR that added the null behavior.

I was looking to see it came from a feature request or had an origin in pandas for (#2890 (comment)) - but the search continues! 😅

@@ -2283,6 +2283,12 @@ def explode(self, columns: str | Sequence[str], *more_columns: str) -> Self:
"""
return super().explode(columns, *more_columns)

def clear(self, n: int = 0) -> Self:
Copy link
Member Author

Choose a reason for hiding this comment

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

TODO: Docstrings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

enh: Add support for DataFrame.clear
2 participants