Skip to content

Commit 11a6c02

Browse files
committed
Merge commit 'v0.9.0rc1-14-g1a4f041' into debian
* commit 'v0.9.0rc1-14-g1a4f041': DOC: add release notes to whatsnew Release notes and addition to test case for tzlocal BUG: errors when tz is tzlocal Add skip_footer to ExcelFile.parse and alias skipfooter/skip_footer revert skip_footer API change. use nrows instead ENH: between_time across midnight pandas-dev#1871 BUG: DataFrame.reset_index failure if both drop and level are present pandas-dev#1957
2 parents d5014a8 + 1a4f041 commit 11a6c02

File tree

13 files changed

+359
-155
lines changed

13 files changed

+359
-155
lines changed

RELEASE.rst

+31-2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ pandas 0.9.0
5656
(dropping both columns and rows) (#924)
5757
- Improve DataFrame.to_html output for hierarchically-indexed rows (do not
5858
repeat levels) (#1929)
59+
- TimeSeries.between_time can now select times across midnight (#1871)
60+
- Enable `skip_footer` parameter in `ExcelFile.parse` (#1843)
61+
- Enable `skipfooter` parameter in text parsers as an alias for `skip_footer`
5962

6063
**API Changes**
6164

@@ -72,6 +75,11 @@ pandas 0.9.0
7275
results) (#1783)
7376
- Setting parts of DataFrame/Panel using ix now aligns input Series/DataFrame
7477
(#1630)
78+
- `first` and `last` methods in `GroupBy` no longer drop non-numeric columns
79+
(#1809)
80+
- Resolved inconsistencies in specifying custom NA values in text parser.
81+
`na_values` of type dict no longer override default NAs unless
82+
`keep_default_na` is set to false explicitly (#1657)
7583

7684
**Bug fixes**
7785

@@ -80,7 +88,7 @@ pandas 0.9.0
8088
- Fix matplotlib auto-color assignment when no custom spectrum passed. Also
8189
respect passed color keyword argument (#1711)
8290
- Fix resampling logical error with closed='left' (#1726)
83-
- Fix critical DatetimeIndex.union bugs (#1730, #1719, #1745, #1702)
91+
- Fix critical DatetimeIndex.union bugs (#1730, #1719, #1745, #1702, #1753)
8492
- Fix critical DatetimeIndex.intersection bug with unanchored offsets (#1708)
8593
- Fix MM-YYYY time series indexing case (#1672)
8694
- Fix case where Categorical group key was not being passed into index in
@@ -138,7 +146,8 @@ pandas 0.9.0
138146
- Fix error when window size > array size in rolling_apply (#1850)
139147
- Fix pip source installation issues via SSH from GitHub
140148
- Fix OLS.summary when column is a tuple (#1837)
141-
- Fix bug in __doc__ patching when -OO passed to interpreter (#1792, #1741)
149+
- Fix bug in __doc__ patching when -OO passed to interpreter
150+
(#1792 #1741 #1774)
142151
- Fix unicode console encoding issue in IPython notebook (#1782, #1768)
143152
- Fix unicode formatting issue with Series.name (#1782)
144153
- Fix bug in DataFrame.duplicated with datetime64 columns (#1833)
@@ -205,6 +214,26 @@ pandas 0.9.0
205214
columns (#1943)
206215
- Fix time zone localization bug causing improper fields (e.g. hours) in time
207216
zones that have not had a UTC transition in a long time (#1946)
217+
- Fix errors when parsing and working with with fixed offset timezones
218+
(#1922, #1928)
219+
- Fix text parser bug when handling UTC datetime objects generated by
220+
dateutil (#1693)
221+
- Fix plotting bug when 'B' is the inferred frequency but index actually
222+
contains weekends (#1668, #1669)
223+
- Fix plot styling bugs (#1666, #1665, #1658)
224+
- Fix plotting bug with index/columns with unicode (#1685)
225+
- Fix DataFrame constructor bug when passed Series with datetime64 dtype
226+
in a dict (#1680)
227+
- Fixed regression in generating DatetimeIndex using timezone aware
228+
datetime.datetime (#1676)
229+
- Fix DataFrame bug when printing concatenated DataFrames with duplicated
230+
columns (#1675)
231+
- Fixed bug when plotting time series with multiple intraday frequencies
232+
(#1732)
233+
- Fix bug in DataFrame.duplicated to enable iterables other than list-types
234+
as input argument (#1773)
235+
- Fix resample bug when passed list of lambdas as `how` argument (#1808)
236+
208237

209238
pandas 0.8.1
210239
============

doc/source/io.rst

+1-3
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,6 @@ 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.
8279
- ``index_col``: column number, column name, or list of column numbers/names,
8380
to use as the ``index`` (row labels) of the resulting DataFrame. By default,
8481
it will number the rows without using any column, unless there is one more
@@ -119,6 +116,7 @@ data into a DataFrame object. They can take a number of arguments:
119116
- ``chunksize``: An number of rows to be used to "chunk" a file into
120117
pieces. Will cause an ``TextParser`` object to be returned. More on this
121118
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)
122120
- ``converters``: a dictionary of functions for converting values in certain
123121
columns, where keys are either integers or column labels
124122
- ``encoding``: a string representing the encoding to use if the contents are

doc/source/v0.9.0.txt

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
.. _whatsnew_0900:
2+
3+
v0.9.0 (September 25, 2012)
4+
---------------------------
5+
6+
This is a major release from 0.8.1 and includes several new features and
7+
enhancements along with a large number of bug fixes. New features include
8+
vectorized unicode encoding/decoding for `Series.str`, `to_latex` method to
9+
DataFrame, more flexible parsing of boolean values, and enabling the download of
10+
options data from Yahoo! Finance.
11+
12+
New features
13+
~~~~~~~~~~~~
14+
15+
- Add ``encode`` and ``decode`` for unicode handling to :ref:`vectorized
16+
string processing methods <basics.string_methods>` in Series.str (GH1706_)
17+
- Add ``DataFrame.to_latex`` method (GH1735_)
18+
- Add convenient expanding window equivalents of all rolling_* ops (GH1785_)
19+
- Add Options class to pandas.io.data for fetching options data from Yahoo!
20+
Finance (GH1748_, GH1739_)
21+
- More flexible parsing of boolean values (Yes, No, TRUE, FALSE, etc)
22+
(GH1691_, GH1295_)
23+
24+
API changes
25+
~~~~~~~~~~~
26+
27+
- Deprecated ``day_of_year`` API removed from PeriodIndex, use ``dayofyear``
28+
(GH1723_)
29+
- Don't modify NumPy suppress printoption at import time
30+
- The internal HDF5 data arrangement for DataFrames has been transposed.
31+
Legacy files will still be readable by HDFStore (GH1834_, GH1824_)
32+
- Legacy cruft removed: pandas.stats.misc.quantileTS
33+
- Use ISO8601 format for Period repr: monthly, daily, and on down (GH1776_)
34+
- Empty DataFrame columns are now created as object dtype. This will prevent
35+
a class of TypeErrors that was occurring in code where the dtype of a
36+
column would depend on the presence of data or not (e.g. a SQL query having
37+
results) (GH1783_)
38+
- Setting parts of DataFrame/Panel using ix now aligns input Series/DataFrame
39+
(GH1630_)
40+
- ``first`` and ``last`` methods in ``GroupBy`` no longer drop non-numeric
41+
columns (GH1809_)
42+
- Resolved inconsistencies in specifying custom NA values in text parser.
43+
`na_values` of type dict no longer override default NAs unless
44+
`keep_default_na` is set to false explicitly (GH1657_)
45+
46+
47+
See the `full release notes
48+
<https://github.com/pydata/pandas/blob/master/RELEASE.rst>`__ or issue tracker
49+
on GitHub for a complete list.
50+
51+
.. _GH1706: https://github.com/pydata/pandas/issues/1706
52+
.. _GH1735: https://github.com/pydata/pandas/issues/1735
53+
.. _GH1785: https://github.com/pydata/pandas/issues/1785
54+
.. _GH1748: https://github.com/pydata/pandas/issues/1748
55+
.. _GH1739: https://github.com/pydata/pandas/issues/1739
56+
.. _GH1691: https://github.com/pydata/pandas/issues/1691
57+
.. _GH1295: https://github.com/pydata/pandas/issues/1295
58+
.. _GH1723: https://github.com/pydata/pandas/issues/1723
59+
.. _GH1834: https://github.com/pydata/pandas/issues/1834
60+
.. _GH1824: https://github.com/pydata/pandas/issues/1824
61+
.. _GH1776: https://github.com/pydata/pandas/issues/1776
62+
.. _GH1783: https://github.com/pydata/pandas/issues/1783
63+
.. _GH1630: https://github.com/pydata/pandas/issues/1630
64+
.. _GH1809: https://github.com/pydata/pandas/issues/1809
65+
.. _GH1657: https://github.com/pydata/pandas/issues/1657

doc/source/whatsnew.rst

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ What's New
1616

1717
These are new features and improvements of note in each release.
1818

19+
.. include:: v0.9.0.txt
20+
1921
.. include:: v0.8.1.txt
2022

2123
.. include:: v0.8.0.txt

pandas/core/frame.py

+15-15
Original file line numberDiff line numberDiff line change
@@ -2489,17 +2489,18 @@ def _maybe_cast(values):
24892489
return values
24902490

24912491
new_index = np.arange(len(new_obj))
2492-
if not drop:
2493-
if isinstance(self.index, MultiIndex):
2492+
if isinstance(self.index, MultiIndex):
2493+
if level is not None:
2494+
if not isinstance(level, (tuple, list)):
2495+
level = [level]
2496+
level = [self.index._get_level_number(lev) for lev in level]
2497+
if len(level) < len(self.index.levels):
2498+
new_index = self.index.droplevel(level)
2499+
2500+
if not drop:
24942501
names = self.index.names
24952502
zipped = zip(self.index.levels, self.index.labels)
24962503

2497-
if level is not None:
2498-
if not isinstance(level, (tuple, list)):
2499-
level = [level]
2500-
2501-
level = [self.index._get_level_number(lev) for lev in level]
2502-
25032504
for i, (lev, lab) in reversed(list(enumerate(zipped))):
25042505
col_name = names[i]
25052506
if col_name is None:
@@ -2510,13 +2511,12 @@ def _maybe_cast(values):
25102511
if level is None or i in level:
25112512
new_obj.insert(0, col_name, level_values.take(lab))
25122513

2513-
if level is not None and len(level) < len(self.index.levels):
2514-
new_index = self.index.droplevel(level)
2515-
else:
2516-
name = self.index.name
2517-
if name is None or name == 'index':
2518-
name = 'index' if 'index' not in self else 'level_0'
2519-
new_obj.insert(0, name, _maybe_cast(self.index.values))
2514+
elif not drop:
2515+
name = self.index.name
2516+
if name is None or name == 'index':
2517+
name = 'index' if 'index' not in self else 'level_0'
2518+
new_obj.insert(0, name, _maybe_cast(self.index.values))
2519+
25202520
new_obj.index = new_index
25212521
return new_obj
25222522

pandas/core/series.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ def set_value(self, label, value):
788788
new_values = np.concatenate([self.values, [value]])
789789
return Series(new_values, index=new_index, name=self.name)
790790

791-
def reset_index(self, drop=False, name=None, inplace=False):
791+
def reset_index(self, level=None, drop=False, name=None, inplace=False):
792792
"""
793793
Analogous to the DataFrame.reset_index function, see docstring there.
794794

0 commit comments

Comments
 (0)