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

DEPR offsets: rename 'M' to 'ME' #52064

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
130 commits
Select commit Hold shift + click to select a range
d21c195
Frequency: raise warnings when using ‘M’ frequency
natmokval Mar 18, 2023
6522436
Frequency: raise warnings when using ‘M’ frequency II
natmokval Mar 18, 2023
8e2b974
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval Mar 30, 2023
184debf
remove is_period and change str representation for freq in Period [sk…
natmokval Mar 30, 2023
e1d82cb
remove is_period and fix some tests [skip ci]
natmokval Mar 30, 2023
55c4d76
fix some tests
natmokval Mar 31, 2023
24756bc
fix some tests II
natmokval Apr 1, 2023
989db20
fix tests in pandas/tests/indexes/period/ [skip ci]
natmokval Apr 4, 2023
253b823
fix tests in pandas/tests/indexes/period/ and correct timedeltas.pyx
natmokval Apr 5, 2023
bfb59ae
fix tests in pandas/tests/indexes/period/ and correct timedeltas.pyx
natmokval Apr 5, 2023
266c480
update frequencies.py, resample.py, and fix some tests
natmokval Apr 6, 2023
c204645
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval Apr 6, 2023
dfbc1ed
modify pandas/tseries/frequencies.py
natmokval Apr 6, 2023
06c1473
fix tests
natmokval Apr 7, 2023
4c9b621
fix tests II
natmokval Apr 8, 2023
a9bd9db
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval Apr 8, 2023
b64e15d
fix tests III
natmokval Apr 8, 2023
0744e9a
rename 'M' to 'ME' in docs
natmokval Apr 9, 2023
c640779
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval Apr 9, 2023
305d035
rename 'M' to 'ME' in docs II
natmokval Apr 9, 2023
31f4cef
rename 'M' to 'ME' in docs III
natmokval Apr 11, 2023
70cd19d
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval Apr 11, 2023
5d9cad5
rename 'M' to 'ME' in docs IV
natmokval Apr 11, 2023
f695a80
rename 'M' to 'ME' in docs V
natmokval Apr 20, 2023
0dfeece
rename 'M' to 'ME' in docs VI
natmokval Apr 20, 2023
87b36ab
add is_period to to_offset I
natmokval May 5, 2023
5c68420
add is_period to to_offset and merge main
natmokval May 6, 2023
69e8ade
add is_period to to_offset II
natmokval May 9, 2023
18be333
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval May 15, 2023
fe8a199
correct the definition of period_array(…) and fix 19 tests
natmokval May 15, 2023
c763b5e
add is_period to _parse_dtype_strict() and fix tests
natmokval May 16, 2023
a0cdb11
add constant OFFSET_TO_PERIOD_FREQSTR to period.pyx and fix tests
natmokval May 17, 2023
92792ec
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval May 17, 2023
ba1220e
correct definitions of extract_ordinals() and _round(), fix tests
natmokval May 18, 2023
dcea43b
add replacement ME to M in _require_matching_freq, _parsed_string_to_…
natmokval May 21, 2023
7ad194a
resolve conflict in test_replace.py
natmokval May 21, 2023
baceaf2
add the constant PERIOD_TO_OFFSET_FREQSTR to period.pyx, correct defi…
natmokval May 22, 2023
d589c68
fix tests
natmokval May 22, 2023
16db0b7
add the conversion ME to M to _from_datetime64, period_index, raise_o…
natmokval May 23, 2023
4defaf9
fix some tests with resample
natmokval May 24, 2023
cc7b069
correct definitions of to_period, freqstr and get_period_alias, fix t…
natmokval May 26, 2023
33e0ac1
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval May 26, 2023
a1701e4
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval May 26, 2023
e6b62d9
correct pre-commit failures
natmokval May 26, 2023
e1f0d65
add key from Grouper to the constructor of TimeGrouper and fix tests
natmokval May 27, 2023
db3124e
add to asfreq() from resampler the conversion ME to M, fix tests
natmokval May 27, 2023
37e4baa
fix tests for for PeriodIndex and base tests for resample
natmokval May 29, 2023
a101781
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval May 29, 2023
6c195e9
correct the constructor of TimeGrouper and fix tests for resample and…
natmokval May 30, 2023
5a5916d
correct the definition of use_dynamic_x() and fix tests for plotting
natmokval May 31, 2023
adff5ae
correct the definition of the method use_dynamic_x, fix tests
natmokval Jun 1, 2023
8af8a36
correct the definition of the asfreq for PeriodArray, _get_period_ali…
natmokval Jun 4, 2023
0ab5c1e
resolve conflicts
natmokval Jun 5, 2023
9bbb970
correct documentation, fix tests
natmokval Jun 5, 2023
6544053
correct docs: rename ME to M for periods
natmokval Jun 7, 2023
b032018
resolve conflicts
natmokval Jun 7, 2023
7233fab
add pytest.mark.xfail to test_to_timestamp_quarterly_bug
natmokval Jun 8, 2023
055a14f
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval Jun 8, 2023
b8a6827
correct mypy error attr-defined
natmokval Jun 10, 2023
4023a54
correct the definition of variables which convert M/ME to ME/M in dty…
natmokval Jun 13, 2023
562d92a
created the c version for dicts which convert M/ME to ME/M and fix my…
natmokval Jun 14, 2023
9106ee9
fix doc build error in 09_timeseries.rst and mypy error
natmokval Jun 14, 2023
da2a32f
correct the constructor of Period, fix mypy errors
natmokval Jun 15, 2023
9e7374c
replace in _attrname_to_abbrevs ME with M and correct the constructor…
natmokval Jun 15, 2023
e352f82
add conversion ME/M to Period constructor, add conversion M/ME to may…
natmokval Jun 15, 2023
fd3174a
correct dict “time rules”, correct the definition of _parsed_string_t…
natmokval Jun 16, 2023
524621a
remove the argument is_period from _parse_dtype_strict
natmokval Jun 18, 2023
021d980
add to is_subperiod, is_superperiod and _is_monthly both M and ME, co…
natmokval Jun 19, 2023
35e0146
add dict ME to M to the definition of freqstr, constructor of Period …
natmokval Jun 19, 2023
db84369
refactor freqstr, extract_ordinals, and _require_matching_freq for P…
natmokval Jun 20, 2023
563c775
refactor _resolution_obj in dtypes.pyx and freqstr in /indexes/dateti…
natmokval Jun 21, 2023
c870d1b
define a new function freq_to_period_freqstr in dtypes to convert ME …
natmokval Jun 21, 2023
4c299cf
refactor use_dynamic_x for plotting and to_period in arrays/datetimes.py
natmokval Jun 21, 2023
55865c9
refactor def _check_plot_works in plotting and test_to_period in clas…
natmokval Jun 21, 2023
a404fa2
resolve conflict
natmokval Jun 21, 2023
b0bd2d8
refactor name method of PeriodDtype, refactor __arrow_array__ and a…
natmokval Jun 22, 2023
b947e6a
resolve conflict in pandas/tests/resample/test_base.py
natmokval Jun 22, 2023
3ab6833
in PeriodArray refactor _from_datetime64 and remove redundant if in …
natmokval Jun 23, 2023
cfb60a3
correct def _resolution_obj in DatetimeLikeArrayMixin, refactor def f…
natmokval Jun 23, 2023
223540c
correct def _resolution_obj in DatetimeLikeArrayMixin and def to_offs…
natmokval Jun 25, 2023
0060761
add tests for 'UserWarning'
natmokval Jun 26, 2023
239090b
refactor methods to_period in DatetimeArray, _from_datetime64 in Peri…
natmokval Jun 26, 2023
6a816ef
add freq_to_offset_freqstr to convert M to ME, refactor _resolution_o…
natmokval Jun 27, 2023
8cbe679
resolve conflict
natmokval Jun 27, 2023
b1e0ad7
fix pre-commit failures
natmokval Jun 27, 2023
454b685
correct the definition of to_period in DatetimeArray, refactor _chec…
natmokval Jun 27, 2023
fa8e15d
correct definitions of _resolution_obj in dtypes.pyx and in DatetimeL…
natmokval Jun 27, 2023
34b5957
correct def asfreq in PeriodArray, remove unused function freq_to_off…
natmokval Jun 28, 2023
3a8dcc1
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval Jun 28, 2023
02c83f3
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval Jun 28, 2023
120355d
roll back in test_fillna_period dtype Period[M] with capital P
natmokval Jun 28, 2023
16e9376
refactor the function raise_on_incompatible
natmokval Jun 28, 2023
a1fd73c
fix mypy error in pandas/core/arrays/period.py
natmokval Jun 29, 2023
c1beb9f
resolve conflicts and fix tests in plotting
natmokval Jun 29, 2023
5052630
fix ruff error in pandas/tests/arrays/period/test_constructors.py
natmokval Jun 29, 2023
ccfc4bd
remove ME from definitions of is_monthly, is_subperiod, correct _mayb…
natmokval Jul 3, 2023
cff4eeb
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval Jul 4, 2023
8c3fc98
fix test_dti_to_period_2monthish
natmokval Jul 4, 2023
b89980e
update whatsnew/v2.1.0.rst
natmokval Jul 11, 2023
c1d9c79
resolve conflicts
natmokval Jul 11, 2023
6ed4730
add an example for old/new behavior in whatsnew/v2.1.0.rst
natmokval Jul 12, 2023
22fe7e3
corrected typo
natmokval Jul 12, 2023
29c4b72
replace name of section Deprecations with Other Deprecations
natmokval Jul 12, 2023
4d4342b
remove ME form is_superperiod, refactored tests
natmokval Jul 13, 2023
e3dcaf6
correct a test
natmokval Jul 13, 2023
616f681
move some tests to a new place
natmokval Jul 18, 2023
b6a9a8e
correct def asfreq for resampling, refactor asfreq for Period, fix tests
natmokval Jul 18, 2023
856f09b
correct tests
natmokval Jul 18, 2023
cbac3be
correct def _shift_with_freq and fix test for shift
natmokval Jul 19, 2023
383799d
correct docs for asfreq in PeriodArray
natmokval Jul 19, 2023
6432301
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval Jul 19, 2023
9d3f15c
correct def _shift_with_freq
natmokval Jul 20, 2023
4f8c861
add ‘me’ to _dont_uppercase, correct _require_matching_freq, fix tests
natmokval Jul 21, 2023
4fade37
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval Jul 24, 2023
0286cf6
minor corrections
natmokval Jul 24, 2023
e32e8cb
resolve conflicts
natmokval Jul 25, 2023
6ee4554
resolve conflict in whatsnew/v2.1.0.rst
natmokval Jul 28, 2023
549d95b
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval Jul 31, 2023
01abf51
resolve conflicts
natmokval Aug 3, 2023
8fb1a4c
resolve conflicts
natmokval Aug 21, 2023
23b567a
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval Aug 21, 2023
3a91cba
correct whatsnew
natmokval Aug 22, 2023
ebbcbf5
resolve conflict in v2.2.0.rst
natmokval Aug 22, 2023
882fefa
correct an example in user_guide/reshaping.rst
natmokval Aug 23, 2023
0bd8b1a
resolve conflicts'
natmokval Aug 30, 2023
05d68c8
Merge branch 'main' into 9586-inconsistent-labeling-sub-daily-super-d…
natmokval Aug 30, 2023
d4e15e1
fix tests for plotting
natmokval Aug 30, 2023
ecee6de
correct tests for plotting
natmokval Aug 31, 2023
141fbdc
resolve conflicts
natmokval Sep 19, 2023
8979eb5
remove from OFFSET_TO_PERIOD_FREQSTR deprecated freqstr, fix tests
natmokval Sep 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove is_period and change str representation for freq in Period [sk…
…ip ci]
  • Loading branch information
natmokval committed Mar 30, 2023
commit 184debf36a44a150560c4bacb96330464a5edf57
2 changes: 1 addition & 1 deletion pandas/_libs/tslibs/period.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2372,7 +2372,7 @@ cdef class _Period(PeriodMixin):
"""
Return a string representation of the frequency.
"""
return self.freq.freqstr
return self.freq.freqstr.replace("ME", "M")

def __repr__(self) -> str:
base = self._dtype._dtype_code
Expand Down
2 changes: 1 addition & 1 deletion pandas/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ def rand_series_with_duplicate_datetimeindex() -> Series:
params=[
(Interval(left=0, right=5), IntervalDtype("int64", "right")),
(Interval(left=0.1, right=0.5), IntervalDtype("float64", "right")),
(Period("2012-01", freq="ME"), "period[ME]"),
(Period("2012-01", freq="M"), "period[M]"),
(Period("2012-02-01", freq="D"), "period[D]"),
(
Timestamp("2011-01-01", tz="US/Eastern"),
Expand Down