Skip to content

Commit bd275d7

Browse files
committed
DOC: concat docs, add some release notes about integer-indexing API changes
1 parent 9135394 commit bd275d7

File tree

3 files changed

+45
-56
lines changed

3 files changed

+45
-56
lines changed

RELEASE.rst

+9
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ pandas 0.7.0
7171

7272
**API Changes**
7373

74+
- Label-indexing with integer indexes now raises KeyError if a label is not
75+
found instead of falling back on location-based indexing
76+
- Label-based slicing via ``ix`` or ``[]`` on Series will now only work if
77+
exact matches for the labels are found or if the index is monotonic (for
78+
range selections)
79+
- Label-based slicing and sequences of labels can be passed to ``[]`` on a
80+
Series for both getting and setting (GH #86)
7481
- `[]` operator (``__getitem__`` and ``__setitem__``) will raise KeyError
7582
with integer indexes when an index is not contained in the index. The prior
7683
behavior would fall back on position-based indexing if a key was not found
@@ -195,6 +202,7 @@ pandas 0.7.0
195202
- Fix bug in handling of non-numeric aggregates in Series.groupby (GH #612)
196203
- Fix TypeError with tuple subclasses (e.g. namedtuple) in
197204
DataFrame.from_records (GH #611)
205+
- Catch misreported console size when running IPython within Emacs
198206

199207
Thanks
200208
------
@@ -216,6 +224,7 @@ Thanks
216224
- Craig Reeson
217225
- Jan Schulz
218226
- Ted Square
227+
- Graham Taylor
219228
- Chris Uga
220229
- Dieter Vandenbussche
221230
- Texas P.

doc/source/merging.rst

+11
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,17 @@ Let's consider a variation on the first example presented:
228228
result = concat(pieces, axis=1, keys=['one', 'two', 'three'])
229229
result
230230
231+
You can also pass a dict to ``concat`` in which case the dict keys will be used
232+
for the ``keys`` argument (unless other keys are specified):
233+
234+
.. ipython:: python
235+
236+
pieces = {'one': df.ix[:, [0, 1]],
237+
'two': df.ix[:, [2]],
238+
'three': df.ix[:, [3]]}
239+
concat(pieces, axis=1)
240+
concat(pieces, keys=['three', 'two'])
241+
231242
The MultiIndex created has levels that are constructed from the passed keys and
232243
the columns of the DataFrame pieces:
233244

doc/source/whatsnew/v0.7.0.txt

+25-56
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,44 @@
33
v.0.7.0 (Not Yet Released)
44
--------------------------
55

6+
API Changes
7+
~~~~~~~~~~~
8+
69
New features
710
~~~~~~~~~~~~
811

12+
- New unified :ref:`merge function <merging.join>` for efficiently performing
13+
full gamut of database / relational-algebra operations. Refactored existing
14+
join methods to use the new infrastructure, resulting in substantial
15+
performance gains (GH220_, GH249_, GH267_)
16+
17+
- New :ref:`unified concatenation function <merging.concat>` for concatenating
18+
Series, DataFrame or Panel objects along an axis. Can form union or
19+
intersection of the other axes. Improves performance of ``Series.append`` and
20+
``DataFrame.append`` (GH468_, GH479_, GH273_)
21+
22+
- :ref:`Can <merging.concatenation>` pass multiple DataFrames to
23+
`DataFrame.append` to concatenate (stack) and multiple Series to
24+
``Series.append`` too
25+
26+
- :ref:`Can<basics.dataframe.from_list_of_dicts>` pass list of dicts (e.g., a
27+
list of JSON objects) to DataFrame constructor (GH526_)
28+
929
- You can now :ref:`set multiple columns <indexing.columns.multiple>` in a
1030
DataFrame via ``__getitem__``, useful for transformation (GH342_)
1131

12-
- New ``merge`` :ref:`function <merging.join>` for efficiently performing full
13-
gamut of database / relational-algebra operations. Refactored existing join
14-
methods to use the new infrastructure, resulting in substantial performance
15-
gains (GH220_, GH249_, GH267_)
16-
1732
- Handle differently-indexed output values in ``DataFrame.apply`` (GH498_)
1833

1934
.. ipython:: python
2035

2136
df = DataFrame(randn(10, 4))
2237
df.apply(lambda x: x.describe())
2338

24-
- :ref:`Can<basics.dataframe.from_list_of_dicts>` pass list of dicts (e.g., a
25-
list of shallow JSON objects) to DataFrame constructor (GH526_)
26-
2739
- :ref:`Add<indexing.reorderlevels>` ``reorder_levels`` method to Series and
2840
DataFrame (PR534_)
2941

30-
- :ref:`Add<indexing.dictionarylike>` dict-like ``get`` function to DataFrame and Panel (PR521_)
42+
- :ref:`Add<indexing.dictionarylike>` dict-like ``get`` function to DataFrame
43+
and Panel (PR521_)
3144

3245
- :ref:`Add<basics.iterrows>` ``DataFrame.iterrows`` method for efficiently
3346
iterating through the rows of a DataFrame
@@ -59,10 +72,6 @@ New features
5972
- :ref:`Can <merging.multiple_join>` pass multiple Panels to ``Panel.join``
6073
(GH115_)
6174

62-
- :ref:`Can <merging.concatenation>` pass multiple DataFrames to
63-
`DataFrame.append` to concatenate (stack) and multiple Series to
64-
``Series.append`` too
65-
6675
- :ref:`Added <io.formatting>` ``justify`` argument to ``DataFrame.to_string``
6776
to allow different alignment of column headers
6877

@@ -86,49 +95,6 @@ presort the data, thus achieving a significant speedup (GH93_). Here's a
8695
graph of the performance of this operation over time on a dataset with 100,000
8796
rows and 10,000 unique groups:
8897

89-
90-
.. .. code-block:: ipython
91-
92-
.. In [5]: df
93-
.. Out[5]:
94-
.. <class 'pandas.core.frame.DataFrame'>
95-
.. Int64Index: 100000 entries, 0 to 99999
96-
.. Data columns:
97-
.. data 100000 non-null values
98-
.. key1 100000 non-null values
99-
.. key2 100000 non-null values
100-
.. dtypes: float64(1), object(2)
101-
102-
.. In [6]: df[:10]
103-
.. Out[6]:
104-
.. data key1 key2
105-
.. 0 2.708 4 1
106-
.. 1 -1.945 2 4
107-
.. 2 -1.123 2 0
108-
.. 3 0.09592 0 0
109-
.. 4 2.328 0 3
110-
.. 5 -0.6481 0 0
111-
.. 6 0.2957 3 2
112-
.. 7 0.7336 2 1
113-
.. 8 0.371 2 4
114-
.. 9 1.009 2 4
115-
116-
.. In [6]: df.groupby(['key1', 'key2']).sum()
117-
.. Out[6]:
118-
.. data
119-
.. key1 key2
120-
.. 0 0 114
121-
.. 1 -14.69
122-
.. 2 89.06
123-
.. 3 -61.31
124-
.. 4 -32.24
125-
.. 1 0 57.91
126-
.. 1 -16.08
127-
.. 2 -46.51
128-
.. 3 15.46
129-
.. 4 18.96
130-
.. ...
131-
13298
.. image:: vbench/figures/groupby_multi_cython.png
13399
:width: 6in
134100

@@ -171,11 +137,14 @@ similar operation to the above but using a Python function:
171137
.. _GH220: https://github.com/wesm/pandas/issues/220
172138
.. _GH249: https://github.com/wesm/pandas/issues/249
173139
.. _GH267: https://github.com/wesm/pandas/issues/267
140+
.. _GH273: https://github.com/wesm/pandas/issues/273
174141
.. _GH338: https://github.com/wesm/pandas/issues/338
175142
.. _GH342: https://github.com/wesm/pandas/issues/342
176143
.. _GH374: https://github.com/wesm/pandas/issues/374
177144
.. _GH439: https://github.com/wesm/pandas/issues/439
145+
.. _GH468: https://github.com/wesm/pandas/issues/468
178146
.. _GH476: https://github.com/wesm/pandas/issues/476
147+
.. _GH479: https://github.com/wesm/pandas/issues/479
179148
.. _GH489: https://github.com/wesm/pandas/issues/489
180149
.. _GH492: https://github.com/wesm/pandas/issues/492
181150
.. _GH496: https://github.com/wesm/pandas/issues/496

0 commit comments

Comments
 (0)