-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
API: rename _prop_attributes to __finalize__ (in NDFrame) #5205
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
Conversation
I was actually toying with the idea of having
then a sub-class (or even in the current implementation of ``finalize`) you could dispatch on the method (which would be the name of the calling method) and do something interesting |
that's similar to what numpy does. Let's be clear about lifecycle for NDFrame:
So if you do
|
also which |
I'm a fan of having it return self, looks nicer in the code too. |
btw - to keep in mind, from the Python docs on magic methods:
http://docs.python.org/2/reference/lexical_analysis.html#reserved-classes-of-identifiers I'm guessing that numpy is popular enough for them not to worry about it 😄 I still like |
rename _propogate_attributes to _metadata (in NDFrame) change methods which directly pass metadata to use __finalize__ These provide a simple mechanism for meta data propagation, which can be overriden in subclasses if desired
Does this have a performance hit? I'd guess that it would be minimal. |
it's already in there (and minimal) |
API: rename _prop_attributes to __finalize__ (in NDFrame)
These provide a simple mechanism for meta data propagation, which
can be overriden in subclasses if desired. Currently these only do non-ambiguous
propagation.
makes #60, #2485 easier