Commit a98be06
authored
DEPR offsets: rename 'M' to 'ME' (#52064)
* Frequency: raise warnings when using ‘M’ frequency
* Frequency: raise warnings when using ‘M’ frequency II
* remove is_period and change str representation for freq in Period [skip ci]
* remove is_period and fix some tests [skip ci]
* fix some tests
* fix some tests II
* fix tests in pandas/tests/indexes/period/ [skip ci]
* fix tests in pandas/tests/indexes/period/ and correct timedeltas.pyx
* update frequencies.py, resample.py, and fix some tests
* modify pandas/tseries/frequencies.py
* fix tests
* fix tests II
* fix tests III
* rename 'M' to 'ME' in docs
* rename 'M' to 'ME' in docs II
* rename 'M' to 'ME' in docs III
* rename 'M' to 'ME' in docs IV
* rename 'M' to 'ME' in docs V
* add is_period to to_offset I
* add is_period to to_offset II
* correct the definition of period_array(…) and fix 19 tests
* add is_period to _parse_dtype_strict() and fix tests
* add constant OFFSET_TO_PERIOD_FREQSTR to period.pyx and fix tests
* correct definitions of extract_ordinals() and _round(), fix tests
* add replacement ME to M in _require_matching_freq, _parsed_string_to_bounds, and fix tests
* add the constant PERIOD_TO_OFFSET_FREQSTR to period.pyx, correct definition of _resolution_obj and fix tests
* fix tests
* add the conversion ME to M to _from_datetime64, period_index, raise_on_incompatible and fix tests
* fix some tests with resample
* correct definitions of to_period, freqstr and get_period_alias, fix tests for plotting
* correct pre-commit failures
* add key from Grouper to the constructor of TimeGrouper and fix tests
* add to asfreq() from resampler the conversion ME to M, fix tests
* fix tests for for PeriodIndex and base tests for resample
* correct the constructor of TimeGrouper and fix tests for resample and plotting
* correct the definition of use_dynamic_x() and fix tests for plotting
* correct the definition of the method use_dynamic_x, fix tests
* correct the definition of the asfreq for PeriodArray, _get_period_alias, and fix tests
* correct documentation, fix tests
* correct docs: rename ME to M for periods
* add pytest.mark.xfail to test_to_timestamp_quarterly_bug
* correct mypy error attr-defined
* correct the definition of variables which convert M/ME to ME/M in dtypes.pyx, declare to_offset in offsets.pyi, fix mypy errors
* created the c version for dicts which convert M/ME to ME/M and fix mypy errors
* fix doc build error in 09_timeseries.rst and mypy error
* correct the constructor of Period, fix mypy errors
* replace in _attrname_to_abbrevs ME with M and correct the constructor of Period
* add conversion ME/M to Period constructor, add conversion M/ME to maybe_resample and reverse changes in _attrname_to_abbrevs
* correct dict “time rules”, correct the definition of _parsed_string_to_bounds, remove is_period from definition _parse_weekly_str and _parse_dtype_strict
* remove the argument is_period from _parse_dtype_strict
* add to is_subperiod, is_superperiod and _is_monthly both M and ME, correct definitions of _downsample and _maybe_cast_slice_bound
* add dict ME to M to the definition of freqstr, constructor of Period and remove pytest.mark.xfail from test_round_trip_current
* refactor freqstr, extract_ordinals, and _require_matching_freq for Period, asfreq for resample and _parsed_string_to_bounds for datetimes
* refactor _resolution_obj in dtypes.pyx and freqstr in /indexes/datetimelike.py
* define a new function freq_to_period_freqstr in dtypes to convert ME to M
* refactor use_dynamic_x for plotting and to_period in arrays/datetimes.py
* refactor def _check_plot_works in plotting and test_to_period in class TestDatetimeArray
* refactor name method of PeriodDtype, refactor __arrow_array__ and add test for ValueError in test_period.py
* in PeriodArray refactor _from_datetime64 and remove redundant if in asfreq, add test for ValueError in test_period_index.py and ignore mypy error
* correct def _resolution_obj in DatetimeLikeArrayMixin, refactor def freqstr in PeriodArray and add tests ValueError for ME
* correct def _resolution_obj in DatetimeLikeArrayMixin and def to_offset, refactor def freqstr in PeriodArray and add tests for ‘ValueError’ and 'UserWarning'
* add tests for 'UserWarning'
* refactor methods to_period in DatetimeArray, _from_datetime64 in PeriodArray, fix test in plotting
* add freq_to_offset_freqstr to convert M to ME, refactor _resolution_obj, add tests for ‘ValueError’ and 'UserWarning'
* fix pre-commit failures
* correct the definition of to_period in DatetimeArray, refactor _check_plot_works, fix test_asfreq_2M
* correct definitions of _resolution_obj in dtypes.pyx and in DatetimeLikeArrayMixin, _attrname_to_abbrevs and fix test_get_attrname_from_abbrev
* correct def asfreq in PeriodArray, remove unused function freq_to_offset_freqstr, fix tests
* roll back in test_fillna_period dtype Period[M] with capital P
* refactor the function raise_on_incompatible
* fix mypy error in pandas/core/arrays/period.py
* fix ruff error in pandas/tests/arrays/period/test_constructors.py
* remove ME from definitions of is_monthly, is_subperiod, correct _maybe_coerce_freq and test_period_ordinal_start_values
* fix test_dti_to_period_2monthish
* update whatsnew/v2.1.0.rst
* add an example for old/new behavior in whatsnew/v2.1.0.rst
* corrected typo
* replace name of section Deprecations with Other Deprecations
* remove ME form is_superperiod, refactored tests
* correct a test
* move some tests to a new place
* correct def asfreq for resampling, refactor asfreq for Period, fix tests
* correct tests
* correct def _shift_with_freq and fix test for shift
* correct docs for asfreq in PeriodArray
* correct def _shift_with_freq
* add ‘me’ to _dont_uppercase, correct _require_matching_freq, fix tests
* minor corrections
* correct whatsnew
* correct an example in user_guide/reshaping.rst
* fix tests for plotting
* correct tests for plotting
* remove from OFFSET_TO_PERIOD_FREQSTR deprecated freqstr, fix tests1 parent 61a6335 commit a98be06
File tree
96 files changed
+726
-397
lines changed- doc/source
- getting_started/intro_tutorials
- user_guide
- whatsnew
- pandas
- _libs/tslibs
- core
- arrays
- dtypes
- groupby
- indexes
- plotting
- _matplotlib
- tests
- arithmetic
- arrays
- categorical
- period
- base
- frame
- methods
- groupby
- transform
- indexes
- datetimes
- methods
- interval
- multi
- period
- methods
- timedeltas
- io
- excel
- plotting
- frame
- resample
- reshape
- scalar
- period
- timedelta
- series
- accessors
- indexing
- methods
- tseries
- frequencies
- offsets
- tslibs
- tseries
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
96 files changed
+726
-397
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
771 | 771 | | |
772 | 772 | | |
773 | 773 | | |
774 | | - | |
| 774 | + | |
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1416 | 1416 | | |
1417 | 1417 | | |
1418 | 1418 | | |
1419 | | - | |
| 1419 | + | |
1420 | 1420 | | |
1421 | 1421 | | |
1422 | 1422 | | |
| |||
1426 | 1426 | | |
1427 | 1427 | | |
1428 | 1428 | | |
1429 | | - | |
| 1429 | + | |
1430 | 1430 | | |
1431 | | - | |
| 1431 | + | |
1432 | 1432 | | |
1433 | 1433 | | |
1434 | 1434 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
453 | | - | |
| 453 | + | |
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
| |||
882 | 882 | | |
883 | 883 | | |
884 | 884 | | |
885 | | - | |
| 885 | + | |
886 | 886 | | |
887 | 887 | | |
888 | 888 | | |
| |||
1246 | 1246 | | |
1247 | 1247 | | |
1248 | 1248 | | |
1249 | | - | |
| 1249 | + | |
1250 | 1250 | | |
1251 | 1251 | | |
1252 | 1252 | | |
| |||
1690 | 1690 | | |
1691 | 1691 | | |
1692 | 1692 | | |
1693 | | - | |
| 1693 | + | |
1694 | 1694 | | |
1695 | 1695 | | |
1696 | 1696 | | |
| |||
1856 | 1856 | | |
1857 | 1857 | | |
1858 | 1858 | | |
1859 | | - | |
| 1859 | + | |
1860 | 1860 | | |
1861 | 1861 | | |
1862 | 1862 | | |
1863 | 1863 | | |
1864 | 1864 | | |
1865 | 1865 | | |
1866 | 1866 | | |
1867 | | - | |
| 1867 | + | |
1868 | 1868 | | |
1869 | 1869 | | |
1870 | 1870 | | |
| |||
2137 | 2137 | | |
2138 | 2138 | | |
2139 | 2139 | | |
2140 | | - | |
| 2140 | + | |
2141 | 2141 | | |
2142 | 2142 | | |
2143 | 2143 | | |
| |||
2256 | 2256 | | |
2257 | 2257 | | |
2258 | 2258 | | |
2259 | | - | |
| 2259 | + | |
2260 | 2260 | | |
2261 | 2261 | | |
2262 | 2262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
860 | 860 | | |
861 | 861 | | |
862 | 862 | | |
863 | | - | |
864 | | - | |
865 | | - | |
866 | | - | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
867 | 877 | | |
868 | 878 | | |
869 | 879 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
837 | 837 | | |
838 | 838 | | |
839 | 839 | | |
840 | | - | |
| 840 | + | |
841 | 841 | | |
842 | | - | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
843 | 858 | | |
844 | 859 | | |
845 | 860 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
502 | | - | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
503 | 521 | | |
504 | 522 | | |
505 | 523 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
180 | 205 | | |
181 | 206 | | |
182 | 207 | | |
| |||
0 commit comments