Skip to content

Commit 9b68f22

Browse files
committed
Merge tag 'v0.9.0rc1' into debian
Version 0.9.0 Release Candidate 1 * tag 'v0.9.0rc1': (58 commits) RLS: Version 0.9.0 Release Candidate 1 BLD: add lib depends pandas-dev#1945 BUG: missing case for assigning DataFrame via ix BUG: python 3.1 timedelta compat issue BUG: python 3 tzoffset is not hashable TST: adds dateutil to travis-ci install commands BUG: let selecting multiple columns in DataFrame.__getitem__ work when there are duplicates. close pandas-dev#1943 BUG: DatetimeConverter does not handle datetime64 arrays properly BUG: reindex with axis=1 when setting Series to scalar location, close pandas-dev#1942 BUG: fix formatting of Timestamps in to_html/IPython notebook. refactor to_html code. close pandas-dev#1940 ENH: allow single str input to na_values pandas-dev#1944 TST: when xlrd is not installed skip tests needing it, close pandas-dev#1941 BUG: DatetimeIndex localizes twice if input is localized DatetimeIndex pandas-dev#1838 BUG: align input on setting via ix pandas-dev#1630 cython methods for group bins pandas-dev#1809 BUG: allow non-numeric columns in groupby first/last pandas-dev#1809 TST: skip unicode filename test if system requires encoding to ascii BUG: more fixedoffset occurrences pandas-dev#1928 BUG: no zone in tzinfo pandas-dev#1838 BUG: handle lists too in DataFrame.xs when partially selecting data from DataFrame. close pandas-dev#1796 ...
2 parents 59de679 + e1b6e44 commit 9b68f22

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1918
-409
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ python:
99

1010
install:
1111
- "if [[ $TRAVIS_PYTHON_VERSION == '2.5' ]]; then pip install --use-mirrors simplejson; fi"
12-
- pip install --use-mirrors cython numpy nose pytz
12+
- pip install --use-mirrors cython numpy nose pytz python-dateutil
1313

1414
script:
1515
- python setup.py build_ext install

LICENSE

+115-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
======================
2-
PANDAS LICENSING TERMS
3-
======================
1+
=======
2+
License
3+
=======
44

5-
pandas is licensed under the BSD 3-Clause (also known as "BSD New" or
6-
"BSD Simplified"), as follows:
5+
pandas is distributed under a 3-clause ("Simplified" or "New") BSD
6+
license. Parts of NumPy, SciPy, numpydoc, bottleneck, which all have
7+
BSD-compatible licenses, are included. Their licenses follow the pandas
8+
license.
9+
10+
pandas license
11+
==============
712

813
Copyright (c) 2011-2012, Lambda Foundry, Inc. and PyData Development Team
914
All rights reserved.
@@ -67,7 +72,7 @@ a record of what changes/contributions they have specific copyright on,
6772
they should indicate their copyright in the commit message of the change
6873
when they commit the change to one of the PyData repositories.
6974

70-
With this in mind, the following banner should be used in any source code
75+
With this in mind, the following banner should be used in any source code
7176
file to indicate the copyright and license terms:
7277

7378
#-----------------------------------------------------------------------------
@@ -77,4 +82,107 @@ file to indicate the copyright and license terms:
7782
# Distributed under the terms of the BSD Simplified License.
7883
#
7984
# The full license is in the LICENSE file, distributed with this software.
80-
#-----------------------------------------------------------------------------
85+
#-----------------------------------------------------------------------------
86+
87+
NumPy license
88+
-------------
89+
90+
Copyright (c) 2005-2012, NumPy Developers.
91+
All rights reserved.
92+
93+
Redistribution and use in source and binary forms, with or without
94+
modification, are permitted provided that the following conditions are
95+
met:
96+
97+
* Redistributions of source code must retain the above copyright
98+
notice, this list of conditions and the following disclaimer.
99+
100+
* Redistributions in binary form must reproduce the above
101+
copyright notice, this list of conditions and the following
102+
disclaimer in the documentation and/or other materials provided
103+
with the distribution.
104+
105+
* Neither the name of the NumPy Developers nor the names of any
106+
contributors may be used to endorse or promote products derived
107+
from this software without specific prior written permission.
108+
109+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
110+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
111+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
112+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
113+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
114+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
115+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
116+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
117+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
118+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
119+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
120+
itions of this License Agreement.
121+
122+
123+
SciPy license
124+
-------------
125+
126+
Copyright (c) 2001, 2002 Enthought, Inc.
127+
All rights reserved.
128+
129+
Copyright (c) 2003-2012 SciPy Developers.
130+
All rights reserved.
131+
132+
Redistribution and use in source and binary forms, with or without
133+
modification, are permitted provided that the following conditions are met:
134+
135+
a. Redistributions of source code must retain the above copyright notice,
136+
this list of conditions and the following disclaimer.
137+
b. Redistributions in binary form must reproduce the above copyright
138+
notice, this list of conditions and the following disclaimer in the
139+
documentation and/or other materials provided with the distribution.
140+
c. Neither the name of the Enthought nor the names of its contributors
141+
may be used to endorse or promote products derived from this software
142+
without specific prior written permission.
143+
144+
145+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
146+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
147+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
148+
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
149+
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
150+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
151+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
152+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
153+
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
154+
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
155+
DAMAGE.
156+
157+
numpydoc license
158+
----------------
159+
160+
The numpydoc license is in pandas/doc/sphinxext/LICENSE.txt
161+
162+
Bottleneck license
163+
------------------
164+
165+
Copyright (c) 2010-2012 Archipel Asset Management AB.
166+
All rights reserved.
167+
168+
Redistribution and use in source and binary forms, with or without
169+
modification, are permitted provided that the following conditions are met:
170+
171+
* Redistributions of source code must retain the above copyright notice,
172+
this list of conditions and the following disclaimer.
173+
174+
* Redistributions in binary form must reproduce the above copyright
175+
notice, this list of conditions and the following disclaimer in the
176+
documentation and/or other materials provided with the distribution.
177+
178+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
179+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
180+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
181+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
182+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
183+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
184+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
185+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
186+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
187+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
188+
POSSIBILITY OF SUCH DAMAGE.

NP_LICENSE.txt

-30
This file was deleted.

README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Dependencies
6363
============
6464

6565
* `NumPy <http://www.numpy.org>`__: 1.6.1 or higher
66-
* `python-dateutil <http://labix.org/python-dateutil>`__ 1.5
66+
* `python-dateutil <http://labix.org/python-dateutil>`__ 1.5 or higher
6767

6868
Optional dependencies
6969
~~~~~~~~~~~~~~~~~~~~~

RELEASE.rst

+43-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pandas 0.9.0
3535
- Add Options class to pandas.io.data for fetching options data from Yahoo!
3636
Finance (#1748, #1739)
3737
- Recognize and convert more boolean values in file parsing (Yes, No, TRUE,
38-
FALSE, variants thereof) (#1691)
38+
FALSE, variants thereof) (#1691, #1295)
3939

4040
**Improvements to existing features**
4141

@@ -46,6 +46,16 @@ pandas 0.9.0
4646
- Add args/kwds options to Series.apply (#1829)
4747
- Add inplace option to Series/DataFrame.reset_index (#1797)
4848
- Add quoting option for DataFrame.to_csv (#1902)
49+
- Indicate long column value truncation in DataFrame output with ... (#1854)
50+
- DataFrame.dot will not do data alignment, and also work with Series (#1915)
51+
- Add ``na`` option for missing data handling in some vectorized string
52+
methods (#1689)
53+
- If index_label=False in DataFrame.to_csv, do not print fields/commas in the
54+
text output. Results in easier importing into R (#1583)
55+
- Can pass tuple/list of axes to DataFrame.dropna to simplify repeated calls
56+
(dropping both columns and rows) (#924)
57+
- Improve DataFrame.to_html output for hierarchically-indexed rows (do not
58+
repeat levels) (#1929)
4959

5060
**API Changes**
5161

@@ -56,6 +66,12 @@ pandas 0.9.0
5666
transposed. Legacy files will still be readable by HDFStore (#1834, #1824)
5767
- Legacy cruft removed: pandas.stats.misc.quantileTS
5868
- Use ISO8601 format for Period repr: monthly, daily, and on down (#1776)
69+
- Empty DataFrame columns are now created as object dtype. This will prevent
70+
a class of TypeErrors that was occurring in code where the dtype of a
71+
column would depend on the presence of data or not (e.g. a SQL query having
72+
results) (#1783)
73+
- Setting parts of DataFrame/Panel using ix now aligns input Series/DataFrame
74+
(#1630)
5975

6076
**Bug fixes**
6177

@@ -161,6 +177,32 @@ pandas 0.9.0
161177
- Fix unicode sheet name failure in to_excel (#1828)
162178
- Override DatetimeIndex.min/max to return Timestamp objects (#1895)
163179
- Fix column name formatting issue in length-truncated column (#1906)
180+
- Fix broken handling of copying Index metadata to new instances created by
181+
view(...) calls inside the NumPy infrastructure
182+
- Support datetime.date again in DateOffset.rollback/rollforward
183+
- Raise Exception if set passed to Series constructor (#1913)
184+
- Add TypeError when appending HDFStore table w/ wrong index type (#1881)
185+
- Don't raise exception on empty inputs in EW functions (e.g. ewma) (#1900)
186+
- Make asof work correctly with PeriodIndex (#1883)
187+
- Fix extlinks in doc build
188+
- Fill boolean DataFrame with NaN when calling shift (#1814)
189+
- Fix setuptools bug causing pip not to Cythonize .pyx files sometimes
190+
- Fix negative integer indexing regression in .ix from 0.7.x (#1888)
191+
- Fix error while retrieving timezone and utc offset from subclasses of
192+
datetime.tzinfo without .zone and ._utcoffset attributes (#1922)
193+
- Fix DataFrame formatting of small, non-zero FP numbers (#1911)
194+
- Various fixes by upcasting of date -> datetime (#1395)
195+
- Raise better exception when passing multiple functions with the same name,
196+
such as lambdas, to GroupBy.aggregate
197+
- Fix DataFrame.apply with axis=1 on a non-unique index (#1878)
198+
- Proper handling of Index subclasses in pandas.unique (#1759)
199+
- Set index names in DataFrame.from_records (#1744)
200+
- Fix time series indexing error with duplicates, under and over hash table
201+
size cutoff (#1821)
202+
- Handle list keys in addition to tuples in DataFrame.xs when
203+
partial-indexing a hierarchically-indexed DataFrame (#1796)
204+
- Support multiple column selection in DataFrame.__getitem__ with duplicate
205+
columns (#1943)
164206

165207
pandas 0.8.1
166208
============

doc/source/io.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ data into a DataFrame object. They can take a number of arguments:
7676
Defaults to 0 (first row); specify None if there is no header row.
7777
- ``skiprows``: A collection of numbers for rows in the file to skip. Can
7878
also be an integer to skip the first ``n`` rows
79+
- ``skip_footer``: Lines at bottom of file to skip. If >0 then indicates the
80+
row to start skipping. If <0 then skips the specified number of rows from
81+
the end.
7982
- ``index_col``: column number, column name, or list of column numbers/names,
8083
to use as the ``index`` (row labels) of the resulting DataFrame. By default,
8184
it will number the rows without using any column, unless there is one more
@@ -116,7 +119,6 @@ data into a DataFrame object. They can take a number of arguments:
116119
- ``chunksize``: An number of rows to be used to "chunk" a file into
117120
pieces. Will cause an ``TextParser`` object to be returned. More on this
118121
below in the section on :ref:`iterating and chunking <io.chunking>`
119-
- ``skip_footer``: number of lines to skip at bottom of file (default 0)
120122
- ``converters``: a dictionary of functions for converting values in certain
121123
columns, where keys are either integers or column labels
122124
- ``encoding``: a string representing the encoding to use if the contents are

pandas/core/algorithms.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def match(to_match, values, na_sentinel=-1):
2929
-------
3030
match : ndarray of integers
3131
"""
32-
values = np.asarray(values)
32+
values = com._asarray_tuplesafe(values)
3333
if issubclass(values.dtype.type, basestring):
3434
values = np.array(values, dtype='O')
3535

pandas/core/common.py

+6
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,12 @@ def intersection(*seqs):
681681
return type(seqs[0])(list(result))
682682

683683
def _asarray_tuplesafe(values, dtype=None):
684+
from pandas.core.index import Index
685+
684686
if not isinstance(values, (list, tuple, np.ndarray)):
685687
values = list(values)
688+
elif isinstance(values, Index):
689+
return values.values
686690

687691
if isinstance(values, list) and dtype in [np.object_, object]:
688692
return lib.list_to_object_array(values)
@@ -771,6 +775,8 @@ def is_float_dtype(arr_or_dtype):
771775
tipo = arr_or_dtype.dtype.type
772776
return issubclass(tipo, np.floating)
773777

778+
def is_list_like(arg):
779+
return hasattr(arg, '__iter__') and not isinstance(arg, basestring)
774780

775781
_ensure_float64 = _algos.ensure_float64
776782
_ensure_int64 = _algos.ensure_int64

0 commit comments

Comments
 (0)