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
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.18.2.txt
+40-4
Original file line number
Diff line number
Diff line change
@@ -32,13 +32,22 @@ Other enhancements
32
32
- The ``.tz_localize()`` method of ``DatetimeIndex`` and ``Timestamp`` has gained the ``errors`` keyword, so you can potentially coerce nonexistent timestamps to ``NaT``. The default behaviour remains to raising a ``NonExistentTimeError`` (:issue:`13057`)
33
33
34
34
- ``Index`` now supports ``.str.extractall()`` which returns ``DataFrame``, see :ref:`Extract all matches in each subject (extractall) <text.extractall>` (:issue:`10008`, :issue:`13156`)
35
+
- ``.to_hdf/read_hdf()`` now accept path objects (e.g. ``pathlib.Path``, ``py.path.local``) for the file path (:issue:`11773`)
35
36
36
37
.. ipython:: python
37
38
38
39
idx = pd.Index(["a1a2", "b1", "c1"])
39
40
idx.str.extractall("[ab](?P<digit>\d)")
40
41
41
-
- The ``pd.read_csv()`` with engine='python' has gained support for the decimal option (:issue:`12933`)
42
+
- ``Timestamp``s can now accept positional and keyword parameters like :func:`datetime.datetime` (:issue:`10758`, :issue:`11630`)
- The ``pd.read_csv()`` with ``engine='python'`` has gained support for the ``decimal`` option (:issue:`12933`)
42
51
43
52
.. _whatsnew_0182.api:
44
53
@@ -47,6 +56,8 @@ API changes
47
56
48
57
49
58
- 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`)
59
+
- An ``UnsupportedFunctionCall`` error is now raised if numpy ufuncs like ``np.mean`` are called on groupby or resample objects (:issue:`12811`)
60
+
- Calls to ``.sample()`` will respect the random seed set via ``numpy.random.seed(n)`` (:issue:`13161`)
50
61
51
62
52
63
.. _whatsnew_0182.api.tolist:
@@ -77,13 +88,26 @@ New Behavior:
77
88
type(s.tolist()[0])
78
89
79
90
91
+
.. _whatsnew_0182.api.to_datetime_coerce:
92
+
93
+
``.to_datetime()`` when coercing
94
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80
95
96
+
A bug is fixed in ``.to_datetime()`` when passing integers or floats, and no ``unit`` and ``errors='coerce'`` (:issue:`13180`).
97
+
Previously if ``.to_datetime()`` encountered mixed integers/floats and strings, but no datetimes with ``errors='coerce'`` it would convert all to ``NaT``.
81
98
99
+
Previous Behavior:
82
100
101
+
.. code-block:: ipython
83
102
103
+
In [2]: pd.to_datetime([1, 'foo'], errors='coerce')
This will now convert integers/floats with the default unit of ``ns``.
85
107
108
+
.. ipython:: python
86
109
110
+
pd.to_datetime([1, 'foo'], errors='coerce')
87
111
88
112
.. _whatsnew_0182.api.other:
89
113
@@ -106,32 +130,39 @@ Performance Improvements
106
130
- increased performance of ``DataFrame.quantile()`` as it now operates per-block (:issue:`11623`)
107
131
108
132
109
-
133
+
- Improved performance of ``DataFrameGroupBy.transform`` (:issue:`12737`)
110
134
111
135
112
136
.. _whatsnew_0182.bug_fixes:
113
137
114
138
Bug Fixes
115
139
~~~~~~~~~
116
140
141
+
- Bug in ``io.json.json_normalize()``, where non-ascii keys raised an exception (:issue:`13213`)
117
142
- Bug in ``SparseSeries`` with ``MultiIndex`` ``[]`` indexing may raise ``IndexError`` (:issue:`13144`)
118
143
- Bug in ``SparseSeries`` with ``MultiIndex`` ``[]`` indexing result may have normal ``Index`` (:issue:`13144`)
119
144
- Bug in ``SparseDataFrame`` in which ``axis=None`` did not default to ``axis=0`` (:issue:`13048`)
145
+
- Bug in ``SparseSeries`` and ``SparseDataFrame`` creation with ``object`` dtype may raise ``TypeError`` (:issue:`11633`)
120
146
- Bug when passing a not-default-indexed ``Series`` as ``xerr`` or ``yerr`` in ``.plot()`` (:issue:`11858`)
147
+
- Bug in matplotlib ``AutoDataFormatter``; this restores the second scaled formatting and re-adds micro-second scaled formatting (:issue:`13131`)
121
148
122
149
123
150
- Bug in ``.groupby(..).resample(..)`` when the same object is called multiple times (:issue:`13174`)
151
+
- Bug in ``.to_records()`` when index name is a unicode string (:issue: `13172`)
124
152
153
+
- Bug in calling ``.memory_usage()`` on object which doesn't implement (:issue:`12924`)
125
154
126
155
- Regression in ``Series.quantile`` with nans (also shows up in ``.median()`` and ``.describe()``); furthermore now names the ``Series`` with the quantile (:issue:`13098`, :issue:`13146`)
127
156
128
-
157
+
- Bug in ``SeriesGroupBy.transform`` with datetime values and missing groups (:issue:`13191`)
129
158
130
159
- Bug in ``Series.str.extractall()`` with ``str`` index raises ``ValueError`` (:issue:`13156`)
131
160
132
161
133
162
- Bug in ``PeriodIndex`` and ``Period`` subtraction raises ``AttributeError`` (:issue:`13071`)
134
-
163
+
- Bug in ``.resample(..)`` with a ``PeriodIndex`` not changing its ``freq`` appropriately when empty (:issue:`13067`)
164
+
- Bug in ``PeriodIndex`` construction returning a ``float64`` index in some circumstances (:issue:`13067`)
165
+
- Bug in ``.resample(..)`` with a ``PeriodIndex`` not retaining its type or name with an empty ``DataFrame``appropriately when empty (:issue:`13212`)
135
166
136
167
137
168
@@ -149,4 +180,9 @@ Bug Fixes
149
180
150
181
- Bug in ``NaT`` - ``Period`` raises ``AttributeError`` (:issue:`13071`)
151
182
- Bug in ``Period`` addition raises ``TypeError`` if ``Period`` is on right hand side (:issue:`13069`)
183
+
- Bug in ``Peirod`` and ``Series`` or ``Index`` comparison raises ``TypeError`` (:issue:`13200`)
152
184
- Bug in ``pd.set_eng_float_format()`` that would prevent NaN's from formatting (:issue:`11981`)
185
+
- Bug in ``.unstack`` with ``Categorical`` dtype resets ``.ordered`` to ``True`` (:issue:`13249`)
186
+
187
+
188
+
- Bug in ``groupby`` where ``apply`` returns different result depending on whether first result is ``None`` or not (:issue:`12824`)
0 commit comments