-
Notifications
You must be signed in to change notification settings - Fork 358
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
Add property: DataFrame.ndim, Index.ndim, MultiIndex.ndim #947
Conversation
Codecov Report
@@ Coverage Diff @@
## master #947 +/- ##
==========================================
+ Coverage 94.51% 94.53% +0.02%
==========================================
Files 34 34
Lines 6449 6464 +15
==========================================
+ Hits 6095 6111 +16
+ Misses 354 353 -1
Continue to review full report at Codecov.
|
@itholic Shall we also add |
Thanks for the comment! i think Series.ndim is already existing. >>> s
NaN 3.0
NaN 1.0
1.0 2.0
2.0 3.0
3.0 4.0
4.0 NaN
Name: 0, dtype: float64
>>> s.ndim
1 then am i going to only add index.ndim here is okay? |
databricks/koalas/indexes.py
Outdated
>>> s.index.ndim | ||
1 | ||
""" | ||
return 1 |
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.
Maybe we should move this to IndexOpsMixin
and remove this in Series
?
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.
@ueshin Thanks for the review!
oh i see. i just rearranged them.
Softagram Impact Report for pull/947 (head commit: 918e89a)⭐ Change Overview
💡 Insights
📄 Full report
Impact Report explained. Give feedback on this report to [email protected] |
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.
LGTM, pending tests.
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.ndim.html#pandas.DataFrame.ndim