Skip to content
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: Fix docstrings for Timestamp: unit, utcoffset, utctimetuple #59480

Closed

Conversation

shreyas-dev
Copy link
Contributor

@shreyas-dev shreyas-dev commented Aug 11, 2024

Part of #59458

Addresses:

pandas.Timestamp.unit having SA01
pandas.Timestamp.utcoffset having SA01
pandas.Timestamp.utctimetuple having SA01

Changes:
Added See Also section for all 3.
Added Returns section for all 3.
Added extended section for all 3
Removed all 3 from code_checks.sh

@rhshadrach rhshadrach added Docs Timestamp pd.Timestamp and associated methods labels Aug 11, 2024
Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

You'll need to fix the NaT docstrings as well

rob-sil and others added 18 commits August 13, 2024 17:37
…59472)

* Add missing single quote to  docstring

* More missing single quotes

* Clean up a print statement

Update docstring for utcoffset
Use old unit one-line description

Remove pandas prefix from See Also due to SA05
Add backticks

Add new line for extended summary in utcoffset
…pandas-dev#59474)

* Doctrings for pandas.Series.str functions
    pandas.Series.str.capitalize
    pandas.Series.str.casefold
    pandas.Series.str.center
    pandas.Series.str.decode
    pandas.Series.str.encode

* Fixed other docstrings along the way
…pandas-dev#59470)

* String dtype: fix convert_dtypes() to convert NaN-string to NA-string

* fix CoW tracking for conversion to python storage strings

* remove xfails
* DOC: Clarify nrows behavior in read_csv

* Remove whitespace from a blank line
…n-empty codes (pandas-dev#59489)

* Fix out-of-bounds violations in safe_sort for empty arrays.

Previously we masked `codes` referring to out-of-bounds elements to 0 and
then fixed them after to -1 using `np.putmask`. However, this results in
out-of-bounds access in `take_nd` if the array is empty.

Instead, set all out-of-bounds indices in `codes` to -1 immediately, as
these can be handled by `take_nd`.

* Remove dead code.

`use_na_sentinel` cannot be truthy inside an else branch where it is
falsy.

* Add test based upon pandas-dev#59421
…amp (pandas-dev#59484)

* updated docstring for pandas.Timestamp.tz_localize, pandas.Timestamp.tzname and pandas.Timestamp.utcfromtimestamp

* trimmed whitespace

* reducing line length

* updating NaT docstrings to match for timestamps
* Make pytz an optional dependency

* Start to address tests

* Fix tests

* Fix tests

* Fix test, import optional pytz in conftest

* Fix formatting

* Change minimum

* remove type ignore

* another pa under 17

* Address comments

* Undo file

* Fix pyarrow 17 test

* Test xpasses on pyarrow 18
… None) (pandas-dev#59488)

* String dtype: honor mode.string_storage option (and change default to None)

* fix test + explicitly test default

* use 'auto' instead of None
…as-dev#59491)

* DOC: add pandas-gbq and related db-dtypes packages to ecosystem

As of pandas 2.2.0, pandas-gbq functionality is fully separated, so I think now would be a good time to introduce it as part of the "ecosystem".

db-dtypes was built for use from pandas-gbq but should be applicable more generally.

* fix pandas-gbq link
@shreyas-dev
Copy link
Contributor Author

Will raise another PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Timestamp pd.Timestamp and associated methods
Projects
None yet
Development

Successfully merging this pull request may close these issues.