-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Fixing EX01 - Added examples #53796
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
Looks like some of the code checks are failing |
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.
nice!
yeah looks like one of the examples might be failing
also, have left some minor comments
pandas/core/arrays/categorical.py
Outdated
@@ -759,6 +772,12 @@ def categories(self) -> Index: | |||
>>> ser = pd.Series(raw_cat) | |||
>>> ser.cat.categories | |||
Index(['b', 'c', 'd'], dtype='object') | |||
|
|||
For Categories: |
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.
How about For Categorical
? likewise below
pandas/core/arrays/categorical.py
Outdated
|
||
>>> cat = pd.Categorical(['a', 'b'], ordered=True) | ||
|
||
The following calls cat.__array__ |
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.
in general for code snippets we probably want double backticks:
The following calls ``cat.__array__``
(unless it's an argument name, in which case a single backtick is fine. the docs aren't terribly consistent about this admittedly)
Thanks for the corrections. |
@MarcoGorelli - it looks green. |
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.
* examples TimedeltaArray, Period.asfreq * Examples for categoricals * Exampl Categorical.codes and .__array__, edited code_checks * Corrected TimedeltaArray and wording to categorical * remove multiline --------- Co-authored-by: MarcoGorelli <[email protected]>
Towards #37875