Skip to content

Commit 88feb4e

Browse files
Merge pull request pandas-dev#9058 from jorisvandenbossche/doc-fixup-0152
DOC: fix-up docs for 0.15.2 release
2 parents 0a5e6c9 + c66f5ee commit 88feb4e

File tree

3 files changed

+80
-85
lines changed

3 files changed

+80
-85
lines changed

doc/source/io.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -3403,7 +3403,7 @@ writes ``data`` to the database in batches of 1000 rows at a time:
34033403
data.to_sql('data_chunked', engine, chunksize=1000)
34043404
34053405
SQL data types
3406-
""""""""""""""
3406+
++++++++++++++
34073407

34083408
:func:`~pandas.DataFrame.to_sql` will try to map your data to an appropriate
34093409
SQL data type based on the dtype of the data. When you have columns of dtype
@@ -3801,7 +3801,7 @@ is lost when exporting.
38013801
Labeled data can similarly be imported from *Stata* data files as ``Categorical``
38023802
variables using the keyword argument ``convert_categoricals`` (``True`` by default).
38033803
The keyword argument ``order_categoricals`` (``True`` by default) determines
3804-
whether imported ``Categorical`` variables are ordered.
3804+
whether imported ``Categorical`` variables are ordered.
38053805

38063806
.. note::
38073807

doc/source/release.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ pandas 0.15.2
5050

5151
**Release date:** (December 12, 2014)
5252

53-
This is a minor release from 0.15.1 and includes a small number of API changes, several new features, enhancements, and performance improvements along with a large number of bug fixes.
53+
This is a minor release from 0.15.1 and includes a large number of bug fixes
54+
along with several new features, enhancements, and performance improvements.
55+
A small number of API changes were necessary to fix existing bugs.
5456

5557
See the :ref:`v0.15.2 Whatsnew <whatsnew_0152>` overview for an extensive list
5658
of all API changes, enhancements and bugs that have been fixed in 0.15.2.

doc/source/whatsnew/v0.15.2.txt

+75-82
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
v0.15.2 (December 12, 2014)
44
---------------------------
55

6-
This is a minor release from 0.15.1 and includes a small number of API changes, several new features,
7-
enhancements, and performance improvements along with a large number of bug fixes. We recommend that all
8-
users upgrade to this version.
6+
This is a minor release from 0.15.1 and includes a large number of bug fixes
7+
along with several new features, enhancements, and performance improvements.
8+
A small number of API changes were necessary to fix existing bugs.
9+
We recommend that all users upgrade to this version.
910

1011
- :ref:`Enhancements <whatsnew_0152.enhancements>`
1112
- :ref:`API Changes <whatsnew_0152.api>`
@@ -16,6 +17,7 @@ users upgrade to this version.
1617

1718
API changes
1819
~~~~~~~~~~~
20+
1921
- Indexing in ``MultiIndex`` beyond lex-sort depth is now supported, though
2022
a lexically sorted index will have a better performance. (:issue:`2646`)
2123

@@ -38,24 +40,30 @@ API changes
3840
df2.index.lexsort_depth
3941
df2.loc[(1,'z')]
4042

41-
- Bug in concat of Series with ``category`` dtype which were coercing to ``object``. (:issue:`8641`)
42-
4343
- Bug in unique of Series with ``category`` dtype, which returned all categories regardless
4444
whether they were "used" or not (see :issue:`8559` for the discussion).
45+
Previous behaviour was to return all categories:
4546

46-
- ``Series.all`` and ``Series.any`` now support the ``level`` and ``skipna`` parameters. ``Series.all``, ``Series.any``, ``Index.all``, and ``Index.any`` no longer support the ``out`` and ``keepdims`` parameters, which existed for compatibility with ndarray. Various index types no longer support the ``all`` and ``any`` aggregation functions and will now raise ``TypeError``. (:issue:`8302`):
47+
.. code-block:: python
4748

48-
.. ipython:: python
49+
In [3]: cat = pd.Categorical(['a', 'b', 'a'], categories=['a', 'b', 'c'])
4950

50-
s = pd.Series([False, True, False], index=[0, 0, 1])
51-
s.any(level=0)
51+
In [4]: cat
52+
Out[4]:
53+
[a, b, a]
54+
Categories (3, object): [a < b < c]
5255

53-
- ``Panel`` now supports the ``all`` and ``any`` aggregation functions. (:issue:`8302`):
56+
In [5]: cat.unique()
57+
Out[5]: array(['a', 'b', 'c'], dtype=object)
58+
59+
Now, only the categories that do effectively occur in the array are returned:
5460

5561
.. ipython:: python
5662

57-
p = pd.Panel(np.random.rand(2, 5, 4) > 0.1)
58-
p.all()
63+
cat = pd.Categorical(['a', 'b', 'a'], categories=['a', 'b', 'c'])
64+
cat.unique()
65+
66+
- ``Series.all`` and ``Series.any`` now support the ``level`` and ``skipna`` parameters. ``Series.all``, ``Series.any``, ``Index.all``, and ``Index.any`` no longer support the ``out`` and ``keepdims`` parameters, which existed for compatibility with ndarray. Various index types no longer support the ``all`` and ``any`` aggregation functions and will now raise ``TypeError``. (:issue:`8302`).
5967

6068
- Allow equality comparisons of Series with a categorical dtype and object dtype; previously these would raise ``TypeError`` (:issue:`8938`)
6169

@@ -90,25 +98,70 @@ API changes
9098

9199
- ``Timestamp('now')`` is now equivalent to ``Timestamp.now()`` in that it returns the local time rather than UTC. Also, ``Timestamp('today')`` is now equivalent to ``Timestamp.today()`` and both have ``tz`` as a possible argument. (:issue:`9000`)
92100

101+
- Fix negative step support for label-based slices (:issue:`8753`)
102+
103+
Old behavior:
104+
105+
.. code-block:: python
106+
107+
In [1]: s = pd.Series(np.arange(3), ['a', 'b', 'c'])
108+
Out[1]:
109+
a 0
110+
b 1
111+
c 2
112+
dtype: int64
113+
114+
In [2]: s.loc['c':'a':-1]
115+
Out[2]:
116+
c 2
117+
dtype: int64
118+
119+
New behavior:
120+
121+
.. ipython:: python
122+
123+
s = pd.Series(np.arange(3), ['a', 'b', 'c'])
124+
s.loc['c':'a':-1]
125+
126+
93127
.. _whatsnew_0152.enhancements:
94128

95129
Enhancements
96130
~~~~~~~~~~~~
97131

132+
``Categorical`` enhancements:
133+
134+
- Added ability to export Categorical data to Stata (:issue:`8633`). See :ref:`here <io.stata-categorical>` for limitations of categorical variables exported to Stata data files.
135+
- Added flag ``order_categoricals`` to ``StataReader`` and ``read_stata`` to select whether to order imported categorical data (:issue:`8836`). See :ref:`here <io.stata-categorical>` for more information on importing categorical variables from Stata data files.
136+
- Added ability to export Categorical data to to/from HDF5 (:issue:`7621`). Queries work the same as if it was an object array. However, the ``category`` dtyped data is stored in a more efficient manner. See :ref:`here <io.hdf5-categorical>` for an example and caveats w.r.t. prior versions of pandas.
137+
- Added support for ``searchsorted()`` on `Categorical` class (:issue:`8420`).
138+
139+
Other enhancements:
140+
98141
- Added the ability to specify the SQL type of columns when writing a DataFrame
99142
to a database (:issue:`8778`).
100143
For example, specifying to use the sqlalchemy ``String`` type instead of the
101144
default ``Text`` type for string columns:
102145

103-
.. code-block::
146+
.. code-block:: python
104147

105148
from sqlalchemy.types import String
106149
data.to_sql('data_dtype', engine, dtype={'Col_1': String})
107150

108-
- Added ability to export Categorical data to Stata (:issue:`8633`). See :ref:`here <io.stata-categorical>` for limitations of categorical variables exported to Stata data files.
109-
- Added flag ``order_categoricals`` to ``StataReader`` and ``read_stata`` to select whether to order imported categorical data (:issue:`8836`). See :ref:`here <io.stata-categorical>` for more information on importing categorical variables from Stata data files.
110-
- Added ability to export Categorical data to to/from HDF5 (:issue:`7621`). Queries work the same as if it was an object array. However, the ``category`` dtyped data is stored in a more efficient manner. See :ref:`here <io.hdf5-categorical>` for an example and caveats w.r.t. prior versions of pandas.
111-
- Added support for ``searchsorted()`` on `Categorical` class (:issue:`8420`).
151+
- ``Series.all`` and ``Series.any`` now support the ``level`` and ``skipna`` parameters (:issue:`8302`):
152+
153+
.. ipython:: python
154+
155+
s = pd.Series([False, True, False], index=[0, 0, 1])
156+
s.any(level=0)
157+
158+
- ``Panel`` now supports the ``all`` and ``any`` aggregation functions. (:issue:`8302`):
159+
160+
.. ipython:: python
161+
162+
p = pd.Panel(np.random.rand(2, 5, 4) > 0.1)
163+
p.all()
164+
112165
- Added support for ``utcfromtimestamp()``, ``fromtimestamp()``, and ``combine()`` on `Timestamp` class (:issue:`5351`).
113166
- Added Google Analytics (`pandas.io.ga`) basic documentation (:issue:`8835`). See :ref:`here<remote_data.ga>`.
114167
- ``Timedelta`` arithmetic returns ``NotImplemented`` in unknown cases, allowing extensions by custom classes (:issue:`8813`).
@@ -122,19 +175,22 @@ Enhancements
122175
- Added ability to read table footers to read_html (:issue:`8552`)
123176
- ``to_sql`` now infers datatypes of non-NA values for columns that contain NA values and have dtype ``object`` (:issue:`8778`).
124177

178+
125179
.. _whatsnew_0152.performance:
126180

127181
Performance
128182
~~~~~~~~~~~
129-
- Reduce memory usage when skiprows is an integer in read_csv (:issue:`8681`)
130183

184+
- Reduce memory usage when skiprows is an integer in read_csv (:issue:`8681`)
131185
- Performance boost for ``to_datetime`` conversions with a passed ``format=``, and the ``exact=False`` (:issue:`8904`)
132186

187+
133188
.. _whatsnew_0152.bug_fixes:
134189

135190
Bug Fixes
136191
~~~~~~~~~
137192

193+
- Bug in concat of Series with ``category`` dtype which were coercing to ``object``. (:issue:`8641`)
138194
- Bug in Timestamp-Timestamp not returning a Timedelta type and datelike-datelike ops with timezones (:issue:`8865`)
139195
- Made consistent a timezone mismatch exception (either tz operated with None or incompatible timezone), will now return ``TypeError`` rather than ``ValueError`` (a couple of edge cases only), (:issue:`8865`)
140196
- Bug in using a ``pd.Grouper(key=...)`` with no level/axis or level only (:issue:`8795`, :issue:`8866`)
@@ -154,95 +210,32 @@ Bug Fixes
154210
- Bug in ``merge`` where ``how='left'`` and ``sort=False`` would not preserve left frame order (:issue:`7331`)
155211
- Bug in ``MultiIndex.reindex`` where reindexing at level would not reorder labels (:issue:`4088`)
156212
- Bug in certain operations with dateutil timezones, manifesting with dateutil 2.3 (:issue:`8639`)
157-
158-
- Fix negative step support for label-based slices (:issue:`8753`)
159-
160-
Old behavior:
161-
162-
.. code-block:: python
163-
164-
In [1]: s = pd.Series(np.arange(3), ['a', 'b', 'c'])
165-
Out[1]:
166-
a 0
167-
b 1
168-
c 2
169-
dtype: int64
170-
171-
In [2]: s.loc['c':'a':-1]
172-
Out[2]:
173-
c 2
174-
dtype: int64
175-
176-
New behavior:
177-
178-
.. ipython:: python
179-
180-
s = pd.Series(np.arange(3), ['a', 'b', 'c'])
181-
s.loc['c':'a':-1]
182-
183213
- Regression in DatetimeIndex iteration with a Fixed/Local offset timezone (:issue:`8890`)
184214
- Bug in ``to_datetime`` when parsing a nanoseconds using the ``%f`` format (:issue:`8989`)
185215
- ``io.data.Options`` now raises ``RemoteDataError`` when no expiry dates are available from Yahoo and when it receives no data from Yahoo (:issue:`8761`), (:issue:`8783`).
186216
- Fix: The font size was only set on x axis if vertical or the y axis if horizontal. (:issue:`8765`)
187217
- Fixed division by 0 when reading big csv files in python 3 (:issue:`8621`)
188218
- Bug in outputing a Multindex with ``to_html,index=False`` which would add an extra column (:issue:`8452`)
189-
190-
191-
192-
193-
194-
195-
196219
- Imported categorical variables from Stata files retain the ordinal information in the underlying data (:issue:`8836`).
197-
198-
199-
200220
- Defined ``.size`` attribute across ``NDFrame`` objects to provide compat with numpy >= 1.9.1; buggy with ``np.array_split`` (:issue:`8846`)
201-
202-
203221
- Skip testing of histogram plots for matplotlib <= 1.2 (:issue:`8648`).
204-
205-
206-
207-
208-
209-
210222
- Bug where ``get_data_google`` returned object dtypes (:issue:`3995`)
211-
212223
- Bug in ``DataFrame.stack(..., dropna=False)`` when the DataFrame's ``columns`` is a ``MultiIndex``
213224
whose ``labels`` do not reference all its ``levels``. (:issue:`8844`)
214-
215-
216225
- Bug in that Option context applied on ``__enter__`` (:issue:`8514`)
217-
218-
219226
- Bug in resample that causes a ValueError when resampling across multiple days
220227
and the last offset is not calculated from the start of the range (:issue:`8683`)
221-
222-
223-
224228
- Bug where ``DataFrame.plot(kind='scatter')`` fails when checking if an np.array is in the DataFrame (:issue:`8852`)
225-
226-
227-
228229
- Bug in ``pd.infer_freq/DataFrame.inferred_freq`` that prevented proper sub-daily frequency inference when the index contained DST days (:issue:`8772`).
229230
- Bug where index name was still used when plotting a series with ``use_index=False`` (:issue:`8558`).
230231
- Bugs when trying to stack multiple columns, when some (or all) of the level names are numbers (:issue:`8584`).
231232
- Bug in ``MultiIndex`` where ``__contains__`` returns wrong result if index is not lexically sorted or unique (:issue:`7724`)
232233
- BUG CSV: fix problem with trailing whitespace in skipped rows, (:issue:`8679`), (:issue:`8661`), (:issue:`8983`)
233234
- Regression in ``Timestamp`` does not parse 'Z' zone designator for UTC (:issue:`8771`)
234-
235-
236-
237-
238-
239-
240235
- Bug in `StataWriter` the produces writes strings with 244 characters irrespective of actual size (:issue:`8969`)
241-
242-
243236
- Fixed ValueError raised by cummin/cummax when datetime64 Series contains NaT. (:issue:`8965`)
244237
- Bug in Datareader returns object dtype if there are missing values (:issue:`8980`)
245238
- Bug in plotting if sharex was enabled and index was a timeseries, would show labels on multiple axes (:issue:`3964`).
246-
247239
- Bug where passing a unit to the TimedeltaIndex constructor applied the to nano-second conversion twice. (:issue:`9011`).
248240
- Bug in plotting of a period-like array (:issue:`9012`)
241+

0 commit comments

Comments
 (0)