Skip to content

Commit b4ff285

Browse files
committed
Merge commit 'v0.7.0rc1-73-g69d5bd8' into debian
* commit 'v0.7.0rc1-73-g69d5bd8': (44 commits) BUG: integer slices should never access label-indexing, GH pandas-dev#700 BUG: pandas-dev#680 clean up with check for py3compat BUG: pandas-dev#680 rears again. cut off another hydra head ENH: change to tree-like MultiIndex output with > 2 levels, GH pandas-dev#689 TST: added a test related to pandas-dev#680 BUG: related to closes pandas-dev#691, removed cruft BUG: closes pandas-dev#691, assignment with ix and mixed dtypes BUG: handle incomparable values when creating Factor, caused bug in py3 TST: Fixes for tests on Python 3. BUG: pandas-dev#680, print consistently when dataframe is empty TST: unit test for PR pandas-dev#684 ENH: Allow Series.to_csv to ignore the index. BUG: raise exception in DateRange with MonthEnd(0) instead of infinite loop, GH pandas-dev#683 BUG: unbox 0-dimensional arrays in map_infer, GH pandas-dev#690 updated license and credits for overview ENH: cythonize timestamp conversion in HDFStore TST: ok, this appears to work GH pandas-dev#680 TST: even more woes GH pandas-dev#680 TST: unicode woes on windoze GH pandas-dev#680 TST: unicode codec test issue, GH pandas-dev#680 ...
2 parents ea66f06 + 69d5bd8 commit b4ff285

34 files changed

+761
-154
lines changed

LICENSE

+49-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
Copyright (c) 2008-2011 AQR Capital Management, LLC
1+
======================
2+
PANDAS LICENSING TERMS
3+
======================
4+
5+
pandas is licensed under the BSD 3-Clause (also known as "BSD New" or
6+
"BSD Simplified"), as follows:
7+
8+
Copyright (c) 2011-2012, Lambda Foundry, Inc. and PyData Development Team
29
All rights reserved.
310

4-
Copyright (c) 2011 Wes McKinney and pandas developers
11+
Copyright (c) 2008-2011 AQR Capital Management, LLC
512
All rights reserved.
613

714
Redistribution and use in source and binary forms, with or without
@@ -31,3 +38,43 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3138
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3239
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3340
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
41+
42+
About the Copyright Holders
43+
===========================
44+
45+
AQR Capital Management began pandas development in 2008. Development was
46+
led by Wes McKinney. AQR released the source under this license in 2009.
47+
Wes is now an employee of Lambda Foundry, and remains the pandas project
48+
lead.
49+
50+
The PyData Development Team is the collection of developers of the PyData
51+
project. This includes all of the PyData sub-projects, including pandas. The
52+
core team that coordinates development on GitHub can be found here:
53+
http://github.com/pydata.
54+
55+
Full credits for pandas contributors can be found in the documentation.
56+
57+
Our Copyright Policy
58+
====================
59+
60+
PyData uses a shared copyright model. Each contributor maintains copyright
61+
over their contributions to PyData. However, it is important to note that
62+
these contributions are typically only changes to the repositories. Thus,
63+
the PyData source code, in its entirety, is not the copyright of any single
64+
person or institution. Instead, it is the collective copyright of the
65+
entire PyData Development Team. If individual contributors want to maintain
66+
a record of what changes/contributions they have specific copyright on,
67+
they should indicate their copyright in the commit message of the change
68+
when they commit the change to one of the PyData repositories.
69+
70+
With this in mind, the following banner should be used in any source code
71+
file to indicate the copyright and license terms:
72+
73+
#-----------------------------------------------------------------------------
74+
# Copyright (c) 2012, PyData Development Team
75+
# All rights reserved.
76+
#
77+
# Distributed under the terms of the BSD Simplified License.
78+
#
79+
# The full license is in the LICENSE file, distributed with this software.
80+
#-----------------------------------------------------------------------------

RELEASE.rst

+12
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ pandas 0.7.0
162162
yourself) to ``groupby`` in some cases (GH #659)
163163
- Use ``kind`` argument to Series.order for selecting different sort kinds
164164
(GH #668)
165+
- Add option to Series.to_csv to omit the index (PR #684)
165166

166167
**Bug fixes**
167168

@@ -231,6 +232,15 @@ pandas 0.7.0
231232
- Fix bugs preventing SparseDataFrame and SparseSeries working with groupby
232233
(GH #666)
233234
- Use sort kind in Series.sort / argsort (GH #668)
235+
- Fix DataFrame operations on non-scalar, non-pandas objects (GH #672)
236+
- Don't convert DataFrame column to integer type when passing integer to
237+
__setitem__ (GH #669)
238+
- Fix downstream bug in pivot_table caused by integer level names in
239+
MultiIndex (GH #678)
240+
- Fix SparseSeries.combine_first when passed a dense Series (GH #687)
241+
- Fix performance regression in HDFStore loading when DataFrame or Panel
242+
stored in table format with datetimes
243+
- Raise Exception in DateRange when offset with n=0 is passed (GH #683)
234244

235245
Thanks
236246
------
@@ -253,13 +263,15 @@ Thanks
253263
- Sam Reckoner
254264
- Craig Reeson
255265
- Jan Schulz
266+
- Skipper Seabold
256267
- Ted Square
257268
- Graham Taylor
258269
- Aman Thakral
259270
- Chris Uga
260271
- Dieter Vandenbussche
261272
- Texas P.
262273
- Pinxing Ye
274+
- ... and everyone I forgot
263275

264276
pandas 0.6.1
265277
============

doc/source/gotchas.rst

+83-1
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,94 @@ general, we were given the difficult choice between either
2727
- Using a special sentinel value, bit pattern, or set of sentinel values to
2828
denote ``NA`` across the dtypes
2929

30+
For many reasons we chose the latter. After years of production use it has
31+
proven, at least in my opinion, to be the best decision given the state of
32+
affairs in NumPy and Python in general. The special value ``NaN``
33+
(Not-A-Number) is used everywhere as the ``NA`` value, and there are API
34+
functions ``isnull`` and ``notnull`` which can be used across the dtypes to
35+
detect NA values.
36+
37+
However, it comes with it a couple of trade-offs which I most certainly have
38+
not ignored.
3039

3140
Support for integer ``NA``
3241
~~~~~~~~~~~~~~~~~~~~~~~~~~
3342

43+
In the absence of high performance ``NA`` support being built into NumPy from
44+
the ground up, the primary casualty is the ability to represent NAs in integer
45+
arrays. For example:
46+
47+
.. ipython:: python
48+
49+
s = Series([1, 2, 3, 4, 5], index=list('abcde'))
50+
s
51+
s.dtype
52+
53+
s2 = s.reindex(['a', 'b', 'c', 'f', 'u'])
54+
s2
55+
s2.dtype
56+
57+
This trade-off is made largely for memory and performance reasons, and also so
58+
that the resulting Series continues to be "numeric". One possibility is to use
59+
``dtype=object`` arrays instead.
60+
3461
``NA`` type promotions
3562
~~~~~~~~~~~~~~~~~~~~~~
3663

64+
When introducing NAs into an existing Series or DataFrame via ``reindex`` or
65+
some other means, boolean and integer types will be promoted to a different
66+
dtype in order to store the NAs. These are summarized by this table:
67+
68+
.. csv-table::
69+
:header: "Typeclass","Promotion dtype for storing NAs"
70+
:widths: 40,60
71+
72+
``floating``, no change
73+
``object``, no change
74+
``integer``, cast to ``float64``
75+
``boolean``, cast to ``object``
76+
77+
While this may seem like a heavy trade-off, in practice I have found very few
78+
cases where this is an issue in practice. Some explanation for the motivation
79+
here in the next section.
80+
81+
Why not make NumPy like R?
82+
~~~~~~~~~~~~~~~~~~~~~~~~~~
83+
84+
Many people have suggested that NumPy should simply emulate the ``NA`` support
85+
present in the more domain-specific statistical programming langauge `R
86+
<http://r-project.org>`__. Part of the reason is the NumPy type hierarchy:
87+
88+
.. csv-table::
89+
:header: "Typeclass","Dtypes"
90+
:widths: 30,70
91+
:delim: |
92+
93+
``numpy.floating`` | ``float16, float32, float64, float128``
94+
``numpy.integer`` | ``int8, int16, int32, int64``
95+
``numpy.unsignedinteger`` | ``uint8, uint16, uint32, uint64``
96+
``numpy.object_`` | ``object_``
97+
``numpy.bool_`` | ``bool_``
98+
``numpy.character`` | ``string_, unicode_``
99+
100+
The R language, by contrast, only has a handful of built-in data types:
101+
``integer``, ``numeric`` (floating-point), ``character``, and
102+
``boolean``. ``NA`` types are implemented by reserving special bit patterns for
103+
each type to be used as the missing value. While doing this with the full NumPy
104+
type hierarchy would be possible, it would be a more substantial trade-off
105+
(especially for the 8- and 16-bit data types) and implementation undertaking.
106+
107+
An alternate approach is that of using masked arrays. A masked array is an
108+
array of data with an associated boolean *mask* denoting whether each value
109+
should be considered ``NA`` or not. I am personally not in love with this
110+
approach as I feel that overall it places a fairly heavy burden on the user and
111+
the library implementer. Additionally, it exacts a fairly high performance cost
112+
when working with numerical data compared with the simple approach of using
113+
``NaN``. Thus, I have chosen the Pythonic "practicality beats purity" approach
114+
and traded integer ``NA`` capability for a much simpler approach of using a
115+
special value in float and object arrays to denote ``NA``, and promoting
116+
integer arrays to floating when NAs must be introduced.
117+
37118
Integer indexing
38119
----------------
39120

@@ -71,7 +152,8 @@ index can be somewhat complicated. For example, the following does not work:
71152
s.ix['c':'e'+1]
72153

73154
A very common use case is to limit a time series to start and end at two
74-
specific dates. To enable this, we made the design design to make label-based slicing include both endpoints:
155+
specific dates. To enable this, we made the design design to make label-based
156+
slicing include both endpoints:
75157

76158
.. ipython:: python
77159

doc/source/overview.rst

+33-12
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ Package overview
2424
* Static and moving window linear and `panel regression
2525
<http://en.wikipedia.org/wiki/Panel_data>`__
2626

27-
License
28-
-------
29-
30-
pandas is released under a standard 3-clause BSD license
31-
3227
Data structures at a glance
3328
---------------------------
3429

@@ -82,16 +77,42 @@ but, for example, columns can be inserted into a DataFrame. However, the vast
8277
majority of methods produce new objects and leave the input data untouched. In
8378
general, though, we like to **favor immutability** where sensible.
8479

80+
Development Team
81+
----------------
82+
83+
pandas is a part of the PyData project. The PyData Development Team is a
84+
collection of developers focused on the improvement of Python's data
85+
libraries. The core team that coordinates development can be found on `Github
86+
<http://github.com/pydata>`__. If you're interested in contributing, please
87+
visit the `project website <http://pandas.pydata.org>`__.
8588

86-
History
89+
Getting Support
90+
---------------
91+
92+
Users and developers are encouraged to join the `pystatsmodels mailing list
93+
<http://groups.google.com/group/pystatsmodels>`__ or to contact Wes McKinney
94+
directly at wesmckinn (-at-) gmail (-dot-) com.
95+
96+
For commercial support, training, or consulting, contact Wes at wes (-at-)
97+
lambdafoundry (-dot-) com.
98+
99+
Credits
87100
-------
88101

89102
pandas development began at `AQR Capital Management <http://www.aqr.com>`__ in
90-
April 2008. It was open-sourced at the end of 2009 and continues to be actively
91-
used and maintained.
92-
93-
Contact
103+
April 2008. It was open-sourced at the end of 2009. AQR continued to provide
104+
resources for development through the end of 2011, and continues to contribute
105+
bug reports today.
106+
107+
Since January 2012, `Lambda Foundry <http://www.lambdafoundry.com>`__, has
108+
been providing development resources, as well as commercial support,
109+
training, and consulting for pandas.
110+
111+
pandas is only made possible by a group of people around the world like you
112+
who have contributed new code, bug reports, fixes, comments and ideas. A
113+
complete list can be found `on Github <http://www.github.com/pydata/pandas/contributors>`__.
114+
115+
License
94116
-------
95117

96-
Please feel free to send comments or questions directly to Wes McKinney at
97-
wesmckinn (-at-) gmail (-dot-) com or the pystatsmodels mailing list.
118+
.. literalinclude:: ../../LICENSE

doc/source/themes/agogo/static/agogo.css_t

+19-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ div.header, div.content, div.footer {
3232

3333
div.header-wrapper {
3434
background: {{ theme_headerbg }};
35+
padding: 1em 1em 0;
3536
border-bottom: 3px solid #2e3436;
37+
min-height: 0px;
3638
}
3739

3840

@@ -105,6 +107,11 @@ img {
105107
border: 0;
106108
}
107109

110+
pre {
111+
background-color: #EEE;
112+
padding: 0.5em;
113+
}
114+
108115
div.admonition {
109116
margin-top: 10px;
110117
margin-bottom: 10px;
@@ -123,10 +130,14 @@ dt:target, .highlighted {
123130

124131
/* Header */
125132

133+
/*
126134
div.header {
127135
padding-top: 10px;
128136
padding-bottom: 10px;
129137
}
138+
*/
139+
140+
div.header {}
130141

131142
div.header h1 {
132143
font-family: {{ theme_headerfont }};
@@ -140,13 +151,16 @@ div.header h1 a {
140151
}
141152

142153
div.header div.rel {
143-
margin-top: 1em;
154+
text-decoration: none;
144155
}
156+
/* margin-top: 1em; */
145157

146158
div.header div.rel a {
159+
margin-top: 1em;
147160
color: {{ theme_headerlinkcolor }};
148161
letter-spacing: .1em;
149162
text-transform: uppercase;
163+
padding: 3px 1em;
150164
}
151165

152166
p.logo {
@@ -161,9 +175,12 @@ img.logo {
161175
/* Content */
162176
div.content-wrapper {
163177
background-color: white;
178+
padding: 1em;
179+
}
180+
/*
164181
padding-top: 20px;
165182
padding-bottom: 20px;
166-
}
183+
*/
167184

168185
/* float: left; */
169186

0 commit comments

Comments
 (0)