Skip to content

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

Merged
merged 7 commits into from
Jun 23, 2023

Conversation

DeaMariaLeon
Copy link
Member

Towards #37875

@DeaMariaLeon DeaMariaLeon added this to the 2.1 milestone Jun 22, 2023
@mroeschke
Copy link
Member

Looks like some of the code checks are failing

Copy link
Member

@MarcoGorelli MarcoGorelli left a 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

@@ -759,6 +772,12 @@ def categories(self) -> Index:
>>> ser = pd.Series(raw_cat)
>>> ser.cat.categories
Index(['b', 'c', 'd'], dtype='object')

For Categories:
Copy link
Member

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


>>> cat = pd.Categorical(['a', 'b'], ordered=True)

The following calls cat.__array__
Copy link
Member

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)

@DeaMariaLeon
Copy link
Member Author

Thanks for the corrections.

@DeaMariaLeon
Copy link
Member Author

@MarcoGorelli - it looks green.

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one - just did a minor fixup but the rest looks good

@MarcoGorelli MarcoGorelli merged commit a2c5f9a into pandas-dev:main Jun 23, 2023
@DeaMariaLeon DeaMariaLeon deleted the examples-Jun21 branch June 23, 2023 16:34
Daquisu pushed a commit to Daquisu/pandas that referenced this pull request Jul 8, 2023
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants