pandas-dev / pandas

Flexible and powerful data analysis / manipulation library for Python, providing labeled data structures similar to R data.frame objects, statistical functions, and much more
https://pandas.pydata.org
BSD 3-Clause "New" or "Revised" License
43.42k stars 17.84k forks source link

DOC: Incorrect Source Link #58350

Open gboeker opened 5 months ago

gboeker commented 5 months ago

Pandas version checks

Location of the documentation

https://pandas.pydata.org/docs/reference/api/pandas.DatetimeIndex.quarter.html

Documentation problem

source link for DatetimeIndex.quarter directs to incorrect code https://github.com/pandas-dev/pandas/blob/v2.2.2/pandas/core/indexes/extension.py#L67-L75

Suggested fix for documentation

replace with the following link https://github.com/pandas-dev/pandas/blob/4afc2771f0e18504cbb5237790cb336712e62f11/pandas/core/arrays/datetimes.py#L1817-L1845

KeiOshima commented 5 months ago

i've seen similar issues in pandas.DatetimeIndex.month and pandas.DatetimeIndex.year

gboeker commented 5 months ago

Source link for DatetimeIndex.round also looks incorrect: Should change to: https://github.com/pandas-dev/pandas/blob/v2.2.2/pandas/core/arrays/datetimelike.py#L1795-L1856

The following also look incorrect: DatetimeIndex.floor DatetimeIndex.std DatetimeIndex.time DatetimeIndex.timetz

gboeker commented 5 months ago

I would love to work on this issue if it looks correct

josh-tan77 commented 2 months ago

take