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

ENH: bfill for interval indexing added GH#51503 #51503 #52103

Closed
wants to merge 34 commits into from

Conversation

hamedgibago
Copy link

@hamedgibago hamedgibago commented Mar 21, 2023

@hamedgibago
Copy link
Author

Test is done for backfill/bfill methods with time intervals. nearest and pad/ffill will be added in future commits.

# GH#51503
if method in ("bfill", "backfill"):
temp = []
for i in range(len(self)):
Copy link
Member

Choose a reason for hiding this comment

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

These for loops are not going to be performant enough for this feature

@mroeschke
Copy link
Member

Thanks for your pull request @hamedgibago. I noticed this is your first pull request into pandas, so I would recommend first tackling an issue labeled good first issue. The issue you are tackling is a bit more complex and has not been triaged by a maintainer yet

@hamedgibago
Copy link
Author

I'll do good first issue issues. Despite this comment you mentioned and not all features added for bfill, because All checks have passed and green, will be this PR accepted?

@mroeschke
Copy link
Member

I am dubious that that for looping solution over each element will be performant enough for this feature

@hamedgibago
Copy link
Author

I am dubious that that for looping solution over each element will be performant enough for this feature

I've added this for type of date time check. Let me see if self._maybe_cast_listlike_indexer and self._maybe_convert_i8(t) will be removed any error happen or not.
For the second loop of comparing indexes, I'll think another way, as I mentioned in TODO comment in the code

@mroeschke
Copy link
Member

Thanks for this pull request, but it appears there hasn't been much traction on this PR in a while so closing for how. Happy for you to tackle an issue that has been triaged or a good first issue

@mroeschke mroeschke closed this Apr 24, 2023
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.

NotImplementedError: method backfill not yet implemented for IntervalIndex
2 participants