Skip to content

DEPR: Deprecate daysinmonth, dayofweek, dayofyear #46768

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

Open
Dr-Irv opened this issue Apr 13, 2022 · 3 comments
Open

DEPR: Deprecate daysinmonth, dayofweek, dayofyear #46768

Dr-Irv opened this issue Apr 13, 2022 · 3 comments
Labels
Deprecate Functionality to remove in pandas Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Period Period data type Timestamp pd.Timestamp and associated methods

Comments

@Dr-Irv
Copy link
Contributor

Dr-Irv commented Apr 13, 2022

Based on original issue #1723 and #1723 (comment) and #37390 (comment), and follow up discussion at #46761 (comment)

Should we deprecate daysinmonth, dayofweek, dayofyear with pointers to days_in_month, day_of_week, and day_of_year respectively for these classes:

  • Timestamp
  • Period
  • DatetimeArray
  • PeriodArray
  • PeriodIndex
  • NaTType
  • Series.dt
  • DatetimeIndex

Other possibilities:

  1. Leave things as they are, document both ways, and include the definitions in type stubs
  2. Leave out of type stubs, but keep in documentation
  3. Leave out of documentation, but include in type stubs
  4. Leave out of documentation and type stubs, but do not deprecate - just make them "hidden"
@Dr-Irv Dr-Irv added Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 13, 2022
@Dr-Irv Dr-Irv added Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Period Period data type Deprecate Functionality to remove in pandas Needs Discussion Requires discussion from core team before further action Timestamp pd.Timestamp and associated methods and removed Enhancement Needs Triage Issue that has not been reviewed by a pandas team member labels Apr 13, 2022
@mroeschke
Copy link
Member

+1 to deprecate in favor of the underscore version

@simonjayhawkins simonjayhawkins added this to the 1.5 milestone Apr 14, 2022
@rhshadrach rhshadrach removed the Needs Discussion Requires discussion from core team before further action label Jun 25, 2022
@rhshadrach
Copy link
Member

Digging through the linked comments/issues, I see no opposition and only indications of support. Removing the Needs Discussion tag.

@mroeschke mroeschke removed this from the 1.5 milestone Aug 15, 2022
@Geometrein
Copy link

+1 in favour of the more readable and consistent underscore version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Period Period data type Timestamp pd.Timestamp and associated methods
Projects
None yet
Development

No branches or pull requests

5 participants