-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
DOC: enable docstring on DataFrame.columns/index #20385
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)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This
? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, fully agree that if we only have 1D/2D this makes much more sense. But maybe we should only clean that up when Panel is removed? |
||
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 readonly
block as axis?And do we want
object
orstr
for 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 readonly
is 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 forCachedProperties
above as well. My cython is not good enough to really know the consequences. I think we usually useobject
for 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
readonly
foraxis
, I will combine them in onecdef readonly
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.
object
vsstr
is pretty harmless in this case. I'd advocate sticking withobject
for now b/c then we don't need to worry about potential py2/py3 bytes/unicode corner cases.