Skip to content

BUG: DataFrame.at with CategoricalIndex #41846

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

Merged
merged 3 commits into from
Jun 16, 2021

Conversation

jbrockmendel
Copy link
Member

@jbrockmendel jbrockmendel commented Jun 7, 2021

  • closes #xxxx
  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them
  • whatsnew entry

@gfyoung gfyoung added Bug Indexing Related to indexing on series/frames, not to indexes themselves Categorical Categorical Data Type labels Jun 7, 2021
@simonjayhawkins
Copy link
Member

release note?

@jbrockmendel
Copy link
Member Author

whatsnew added + green

col = self.columns.get_loc(col)
index = self.index.get_loc(index)
return self._get_value(index, col, takeable=True)
except AttributeError:
Copy link
Contributor

Choose a reason for hiding this comment

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

on the list to add?

Copy link
Member Author

Choose a reason for hiding this comment

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

once this is merged ill push my branch that implements IntervalTree.get_loc, getting rid of the AttributeError


Notes
-----
Assumes that index and columns both have ax._index_as_unique;
Copy link
Contributor

Choose a reason for hiding this comment

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

don't we have this as a base Index property? (or it can raise NotImplementedError), e.g. dont' like the AttributeError checking here.

Copy link
Member Author

@jbrockmendel jbrockmendel Jun 9, 2021

Choose a reason for hiding this comment

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

ill rephrase, it isn't that they have the attribute, it is that this is only called if self.index._index_as_unique and self.columns._index_as_unique

@simonjayhawkins
Copy link
Member

This is for 1.3?

@jreback
Copy link
Contributor

jreback commented Jun 12, 2021

don't add things to 1.3
when we merge can add if appropriate

@jreback jreback removed this from the 1.3 milestone Jun 12, 2021
@simonjayhawkins
Copy link
Member

This has a release note in 1.3.0 whatsnew. if not 1.3 we need to request it moved. any suggestions how to track this.

@jreback
Copy link
Contributor

jreback commented Jun 12, 2021

i undestand and it prob will be merged but let's look first
eg don't preemptively label (i may have done that here)

@jbrockmendel
Copy link
Member Author

its a bugfix so i wrote the note for 1.3, wont be the end of the world if it has to wait for the next one

@jbrockmendel
Copy link
Member Author

should i move release note to 1.4 file?

@simonjayhawkins
Copy link
Member

should i move release note to 1.4 file?

not yet. I think Jeff just didn't want stuff added to the 1.3 milestone for now.

@jbrockmendel
Copy link
Member Author

if the RC is put off until tomorrow, can this go in? it is a blocker for #41956

@simonjayhawkins
Copy link
Member

simonjayhawkins commented Jun 13, 2021 via email

@simonjayhawkins
Copy link
Member

Doesn't look like there's a fix for the wheel issue. So may release what we have.

tbc. I should have said we are not necessarily putting off the rc, and that if the wheel issue is not fixed quickly, we could release rc0 and then follow-up with a rc1. So the same backport rules apply. We have a rc0, but may not advertise the fact. So the rc is not put-off, it has effectively happened.

@jreback jreback added this to the 1.3 milestone Jun 16, 2021
@jreback jreback merged commit 764f2df into pandas-dev:master Jun 16, 2021
@jreback
Copy link
Contributor

jreback commented Jun 16, 2021

@meeseeksdev backport 1.3.x

@lumberbot-app
Copy link

lumberbot-app bot commented Jun 16, 2021

Something went wrong ... Please have a look at my logs.

@jbrockmendel jbrockmendel deleted the ref-_get_value branch June 16, 2021 00:29
simonjayhawkins pushed a commit that referenced this pull request Jun 16, 2021
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Categorical Categorical Data Type Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants