Skip to content

Commit

Permalink
Merge tag 'v0.9.0rc1' into debian
Browse files Browse the repository at this point in the history
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
  ...
  • Loading branch information
yarikoptic committed Sep 21, 2012
2 parents 59de679 + e1b6e44 commit 9b68f22
Show file tree
Hide file tree
Showing 54 changed files with 1,918 additions and 409 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ python:

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

script:
- python setup.py build_ext install
Expand Down
122 changes: 115 additions & 7 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
======================
PANDAS LICENSING TERMS
======================
=======
License
=======

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

pandas license
==============

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

With this in mind, the following banner should be used in any source code
With this in mind, the following banner should be used in any source code
file to indicate the copyright and license terms:

#-----------------------------------------------------------------------------
Expand All @@ -77,4 +82,107 @@ file to indicate the copyright and license terms:
# Distributed under the terms of the BSD Simplified License.
#
# The full license is in the LICENSE file, distributed with this software.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------

NumPy license
-------------

Copyright (c) 2005-2012, NumPy Developers.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.

* Neither the name of the NumPy Developers nor the names of any
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
itions of this License Agreement.


SciPy license
-------------

Copyright (c) 2001, 2002 Enthought, Inc.
All rights reserved.

Copyright (c) 2003-2012 SciPy Developers.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

a. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
b. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
c. Neither the name of the Enthought nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.


THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.

numpydoc license
----------------

The numpydoc license is in pandas/doc/sphinxext/LICENSE.txt

Bottleneck license
------------------

Copyright (c) 2010-2012 Archipel Asset Management AB.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
30 changes: 0 additions & 30 deletions NP_LICENSE.txt

This file was deleted.

2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Dependencies
============

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

Optional dependencies
~~~~~~~~~~~~~~~~~~~~~
Expand Down
44 changes: 43 additions & 1 deletion RELEASE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pandas 0.9.0
- Add Options class to pandas.io.data for fetching options data from Yahoo!
Finance (#1748, #1739)
- Recognize and convert more boolean values in file parsing (Yes, No, TRUE,
FALSE, variants thereof) (#1691)
FALSE, variants thereof) (#1691, #1295)

**Improvements to existing features**

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

**API Changes**

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

**Bug fixes**

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

pandas 0.8.1
============
Expand Down
4 changes: 3 additions & 1 deletion doc/source/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ data into a DataFrame object. They can take a number of arguments:
Defaults to 0 (first row); specify None if there is no header row.
- ``skiprows``: A collection of numbers for rows in the file to skip. Can
also be an integer to skip the first ``n`` rows
- ``skip_footer``: Lines at bottom of file to skip. If >0 then indicates the
row to start skipping. If <0 then skips the specified number of rows from
the end.
- ``index_col``: column number, column name, or list of column numbers/names,
to use as the ``index`` (row labels) of the resulting DataFrame. By default,
it will number the rows without using any column, unless there is one more
Expand Down Expand Up @@ -116,7 +119,6 @@ data into a DataFrame object. They can take a number of arguments:
- ``chunksize``: An number of rows to be used to "chunk" a file into
pieces. Will cause an ``TextParser`` object to be returned. More on this
below in the section on :ref:`iterating and chunking <io.chunking>`
- ``skip_footer``: number of lines to skip at bottom of file (default 0)
- ``converters``: a dictionary of functions for converting values in certain
columns, where keys are either integers or column labels
- ``encoding``: a string representing the encoding to use if the contents are
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def match(to_match, values, na_sentinel=-1):
-------
match : ndarray of integers
"""
values = np.asarray(values)
values = com._asarray_tuplesafe(values)
if issubclass(values.dtype.type, basestring):
values = np.array(values, dtype='O')

Expand Down
6 changes: 6 additions & 0 deletions pandas/core/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,12 @@ def intersection(*seqs):
return type(seqs[0])(list(result))

def _asarray_tuplesafe(values, dtype=None):
from pandas.core.index import Index

if not isinstance(values, (list, tuple, np.ndarray)):
values = list(values)
elif isinstance(values, Index):
return values.values

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

def is_list_like(arg):
return hasattr(arg, '__iter__') and not isinstance(arg, basestring)

_ensure_float64 = _algos.ensure_float64
_ensure_int64 = _algos.ensure_int64
Expand Down
Loading

0 comments on commit 9b68f22

Please sign in to comment.