-
- Notifications
You must be signed in to change notification settings - Fork 19.2k
DOC: enable docstring on DataFrame.columns/index #20385
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -278,7 +278,7 @@ def _setup_axes(cls, axes, info_axis=None, stat_axis=None, aliases=None, | |
| if build_axes: | ||
| | ||
| def set_axis(a, i): | ||
| setattr(cls, a, properties.AxisProperty(i)) | ||
| setattr(cls, a, properties.AxisProperty(i, a)) | ||
| ||
| cls._internal_names_set.add(a) | ||
| | ||
| if axes_are_reversed: | ||
| | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this go under the same
def readonlyblock as axis?And do we want
objectorstrfor the type?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops, the above
cdef readonlyis a typo, I meant to keep it asreadonly.I am not fully sure if it is actually needed for
axis, or if we can also make itreadonly(I would think it is never modified internally, bot not sure)For the
object, it is what is done forCachedPropertiesabove as well. My cython is not good enough to really know the consequences. I think we usually useobjectfor strings in our cython code.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the test pass with using
readonlyforaxis, I will combine them in onecdef readonlyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
objectvsstris pretty harmless in this case. I'd advocate sticking withobjectfor now b/c then we don't need to worry about potential py2/py3 bytes/unicode corner cases.