You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
closespandas-dev#12160
Author: sinhrks <[email protected]>
Closespandas-dev#13593 from sinhrks/depr_timestamp_offset and squashes the following commits:
c7749d5 [sinhrks] DEPR: rename Timestamp.offset to .freq
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.19.0.txt
+14-18
Original file line number
Diff line number
Diff line change
@@ -194,15 +194,15 @@ Other enhancements
194
194
pd.to_numeric(s, downcast='unsigned')
195
195
pd.to_numeric(s, downcast='integer')
196
196
197
-
- ``Index`` now supports ``.str.extractall()`` which returns a ``DataFrame``, see :ref:`documentation here <text.extractall>` (:issue:`10008`, :issue:`13156`)
197
+
- ``Index`` now supports ``.str.extractall()`` which returns a ``DataFrame``, the see :ref:`docs here <text.extractall>` (:issue:`10008`, :issue:`13156`)
198
198
- ``.to_hdf/read_hdf()`` now accept path objects (e.g. ``pathlib.Path``, ``py.path.local``) for the file path (:issue:`11773`)
199
199
200
200
.. ipython:: python
201
201
202
202
idx = pd.Index(["a1a2", "b1", "c1"])
203
203
idx.str.extractall("[ab](?P<digit>\d)")
204
204
205
-
- ``Timestamp`` s can now accept positional and keyword parameters like :func:`datetime.datetime` (:issue:`10758`, :issue:`11630`)
205
+
- ``Timestamp`` can now accept positional and keyword parameters similar to :func:`datetime.datetime` (:issue:`10758`, :issue:`11630`)
206
206
207
207
.. ipython:: python
208
208
@@ -227,8 +227,7 @@ Other enhancements
227
227
- Consistent with the Python API, ``pd.read_csv()`` will now interpret ``+inf`` as positive infinity (:issue:`13274`)
228
228
- The ``DataFrame`` constructor will now respect key ordering if a list of ``OrderedDict`` objects are passed in (:issue:`13304`)
229
229
- ``pd.read_html()`` has gained support for the ``decimal`` option (:issue:`12907`)
230
-
- A ``union_categorical`` function has been added for combining categoricals, see :ref:`Unioning Categoricals<categorical.union>` (:issue:`13361`)
231
-
- ``eval``'s upcasting rules for ``float32`` types have been updated to be more consistent with NumPy's rules. New behavior will not upcast to ``float64`` if you multiply a pandas ``float32`` object by a scalar float64. (:issue:`12388`)
230
+
- A top-level function :func:`union_categorical` has been added for combining categoricals, see :ref:`Unioning Categoricals<categorical.union>` (:issue:`13361`)
232
231
- ``Series`` has gained the properties ``.is_monotonic``, ``.is_monotonic_increasing``, ``.is_monotonic_decreasing``, similar to ``Index`` (:issue:`13336`)
233
232
234
233
.. _whatsnew_0190.api:
@@ -238,9 +237,16 @@ API changes
238
237
239
238
240
239
- Non-convertible dates in an excel date column will be returned without conversion and the column will be ``object`` dtype, rather than raising an exception (:issue:`10001`)
240
+
- ``eval``'s upcasting rules for ``float32`` types have been updated to be more consistent with NumPy's rules. New behavior will not upcast to ``float64`` if you multiply a pandas ``float32`` object by a scalar float64. (:issue:`12388`)
241
241
- An ``UnsupportedFunctionCall`` error is now raised if NumPy ufuncs like ``np.mean`` are called on groupby or resample objects (:issue:`12811`)
242
242
- Calls to ``.sample()`` will respect the random seed set via ``numpy.random.seed(n)`` (:issue:`13161`)
243
243
- ``Styler.apply`` is now more strict about the outputs your function must return. For ``axis=0`` or ``axis=1``, the output shape must be identical. For ``axis=None``, the output must be a DataFrame with identical columns and index labels. (:issue:`13222`)
244
+
- ``Float64Index.astype(int)`` will now raise ``ValueError`` if ``Float64Index`` contains ``NaN`` values (:issue:`13149`)
245
+
- ``TimedeltaIndex.astype(int)`` and ``DatetimeIndex.astype(int)`` will now return ``Int64Index`` instead of ``np.array`` (:issue:`13209`)
246
+
- ``.filter()`` enforces mutual exclusion of the keyword arguments. (:issue:`12399`)
247
+
- ``PeridIndex`` can now accept ``list`` and ``array`` which contains ``pd.NaT`` (:issue:`13430`)
248
+
- ``__setitem__`` will no longer apply a callable rhs as a function instead of storing it. Call ``where`` directly to get the previous behavior. (:issue:`13299`)
249
+
244
250
245
251
.. _whatsnew_0190.api.tolist:
246
252
@@ -361,7 +367,7 @@ We are able to preserve the join keys
361
367
pd.merge(df1, df2, how='outer').dtypes
362
368
363
369
Of course if you have missing values that are introduced, then the
364
-
resulting dtype will be upcast (unchanged from previous).
370
+
resulting dtype will be upcast, which is unchanged from previous.
365
371
366
372
.. ipython:: python
367
373
@@ -419,17 +425,6 @@ Furthermore:
419
425
- Passing duplicated ``percentiles`` will now raise a ``ValueError``.
420
426
- Bug in ``.describe()`` on a DataFrame with a mixed-dtype column index, which would previously raise a ``TypeError`` (:issue:`13288`)
421
427
422
-
.. _whatsnew_0190.api.other:
423
-
424
-
Other API changes
425
-
^^^^^^^^^^^^^^^^^
426
-
427
-
- ``Float64Index.astype(int)`` will now raise ``ValueError`` if ``Float64Index`` contains ``NaN`` values (:issue:`13149`)
428
-
- ``TimedeltaIndex.astype(int)`` and ``DatetimeIndex.astype(int)`` will now return ``Int64Index`` instead of ``np.array`` (:issue:`13209`)
429
-
- ``.filter()`` enforces mutual exclusion of the keyword arguments. (:issue:`12399`)
430
-
- ``PeridIndex`` can now accept ``list`` and ``array`` which contains ``pd.NaT`` (:issue:`13430`)
431
-
- ``__setitem__`` will no longer apply a callable rhs as a function instead of storing it. Call ``where`` directly to get the previous behavior. (:issue:`13299`)
432
-
433
428
.. _whatsnew_0190.deprecations:
434
429
435
430
Deprecations
@@ -439,6 +434,7 @@ Deprecations
439
434
- ``buffer_lines`` has been deprecated in ``pd.read_csv()`` and will be removed in a future version (:issue:`13360`)
440
435
- ``as_recarray`` has been deprecated in ``pd.read_csv()`` and will be removed in a future version (:issue:`13373`)
441
436
- top-level ``pd.ordered_merge()`` has been renamed to ``pd.merge_ordered()`` and the original name will be removed in a future version (:issue:`13358`)
437
+
- ``Timestamp.offset`` property (and named arg in the constructor), has been deprecated in favor of ``freq`` (:issue:`12160`)
442
438
443
439
.. _whatsnew_0190.performance:
444
440
@@ -503,7 +499,7 @@ Bug Fixes
503
499
- Bug in ``pd.read_csv()`` in which the ``nrows`` argument was not properly validated for both engines (:issue:`10476`)
504
500
- Bug in ``pd.read_csv()`` with ``engine='python'`` in which infinities of mixed-case forms were not being interpreted properly (:issue:`13274`)
505
501
- Bug in ``pd.read_csv()`` with ``engine='python'`` in which trailing ``NaN`` values were not being parsed (:issue:`13320`)
506
-
- Bug in ``pd.read_csv()`` with ``engine='python'`` when reading from a tempfile.TemporaryFile on Windows with Python 3 (:issue:`13398`)
502
+
- Bug in ``pd.read_csv()`` with ``engine='python'`` when reading from a ``tempfile.TemporaryFile`` on Windows with Python 3 (:issue:`13398`)
507
503
- Bug in ``pd.read_csv()`` that prevents ``usecols`` kwarg from accepting single-byte unicode strings (:issue:`13219`)
508
504
- Bug in ``pd.read_csv()`` that prevents ``usecols`` from being an empty set (:issue:`13402`)
509
505
- Bug in ``pd.read_csv()`` with ``engine=='c'`` in which null ``quotechar`` was not accepted even though ``quoting`` was specified as ``None`` (:issue:`13411`)
@@ -516,7 +512,7 @@ Bug Fixes
516
512
517
513
518
514
- Bug in ``pd.to_datetime()`` when passing invalid datatypes (e.g. bool); will now respect the ``errors`` keyword (:issue:`13176`)
519
-
- Bug in ``pd.to_datetime()`` which overflowed on ``int8``, `int16`` dtypes (:issue:`13451`)
515
+
- Bug in ``pd.to_datetime()`` which overflowed on ``int8``, and ``int16`` dtypes (:issue:`13451`)
520
516
- Bug in extension dtype creation where the created types were not is/identical (:issue:`13285`)
521
517
522
518
- Bug in ``NaT`` - ``Period`` raises ``AttributeError`` (:issue:`13071`)
0 commit comments