Skip to content

Commit 3968707

Browse files
committed
RLS: 0.8.0 what's new docs
1 parent c0151bd commit 3968707

File tree

13 files changed

+79
-43
lines changed

13 files changed

+79
-43
lines changed

RELEASE.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ pandas 0.8.0
4343
conversion method (#1018)
4444
- Implement robust frequency inference function and `inferred_freq` attribute
4545
on DatetimeIndex (#391)
46-
- New ``tz_convert`` methods in Series / DataFrame
46+
- New ``tz_convert`` and ``tz_localize`` methods in Series / DataFrame
4747
- Convert DatetimeIndexes to UTC if time zones are different in join/setops
4848
(#864)
4949
- Add limit argument for forward/backward filling to reindex, fillna,
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

doc/source/whatsnew/v0.8.0.txt renamed to doc/source/v0.8.0.txt

Lines changed: 49 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,16 @@ Time series changes and improvements
6767
PeriodIndex and DatetimeIndex
6868
- New Timestamp data type subclasses `datetime.datetime`, providing the same
6969
interface while enabling working with nanosecond-resolution data. Also
70-
provides **easy time zone conversions**
71-
- Enhanced support for **time zones**. Add `tz_convert` methods to TimeSeries
72-
and DataFrame. All timestamps are stored as UTC; Timestamps from
73-
DatetimeIndex objects with time zone set will be localized to localtime. Time
74-
zone conversions are therefore essentially free. User needs to know very
75-
little about pytz library now; only time zone names as as strings are
76-
required. Timestamps are equal if and only if their UTC timestamps
77-
match. Operations between time series with different time zones will result
78-
in a UTC-indexed time series
70+
provides :ref:`easy time zone conversions <timeseries.timezone>`.
71+
- Enhanced support for :ref:`time zones <timeseries.timezone>`. Add
72+
`tz_convert` and ``tz_lcoalize`` methods to TimeSeries and DataFrame. All
73+
timestamps are stored as UTC; Timestamps from DatetimeIndex objects with time
74+
zone set will be localized to localtime. Time zone conversions are therefore
75+
essentially free. User needs to know very little about pytz library now; only
76+
time zone names as as strings are required. Time zone-aware timestamps are
77+
equal if and only if their UTC timestamps match. Operations between time
78+
zone-aware time series with different time zones will result in a UTC-indexed
79+
time series.
7980
- Time series **string indexing conveniences** / shortcuts: slice years, year
8081
and month, and index values with strings
8182
- Enhanced time series **plotting**; adaptation of scikits.timeseries
@@ -115,6 +116,7 @@ Other new features
115116
function) for computing a categorical variable from a continuous variable by
116117
binning values either into value-based (``cut``) or quantile-based (``qcut``)
117118
bins
119+
- Rename ``Factor`` to ``Categorical`` and add a number of usability features
118120
- Add :ref:`limit <missing_data.fillna.limit>` argument to fillna/reindex
119121
- More flexible multiple function application in GroupBy, and can pass list
120122
(name, function) tuples to get result in particular order with given names
@@ -135,8 +137,8 @@ Other new features
135137
memory usage than Python's dict
136138
- Add first, last, min, max, and prod optimized GroupBy functions
137139
- New :ref:`ordered_merge <merging.ordered_merge>` function
138-
- Add flexible :ref:`comparison <basics.binop>` instance methods eq, ne, lt, gt, etc. to DataFrame,
139-
Series
140+
- Add flexible :ref:`comparison <basics.binop>` instance methods eq, ne, lt,
141+
gt, etc. to DataFrame, Series
140142
- Improve :ref:`scatter_matrix <visualization.scatter_matrix>` plotting
141143
function and add histogram or kernel density estimates to diagonal
142144
- Add :ref:`'kde' <visualization.kde>` plot option for density plots
@@ -148,6 +150,42 @@ Other new features
148150
- Can select multiple columns from GroupBy
149151
- Add :ref:`update <merging.combine_first.update>` methods to Series/DataFrame
150152
for updating values in place
153+
- Add ``any`` and ``all method to DataFrame
154+
155+
New plotting methods
156+
~~~~~~~~~~~~~~~~~~~~
157+
158+
.. ipython:: python
159+
:suppress:
160+
161+
import pandas as pd
162+
fx = pd.load('data/fx_prices')
163+
import matplotlib.pyplot as plt
164+
165+
``Series.plot`` now supports a ``secondary_y`` option:
166+
167+
.. ipython:: python
168+
169+
plt.figure()
170+
171+
fx['FR'].plot(style='g')
172+
173+
@savefig whatsnew_secondary_y.png width=4.5in
174+
fx['IT'].plot(style='k--', secondary_y=True)
175+
176+
Vytautas Jancauskas, the 2012 GSOC participant, has added many new plot
177+
types. For example, ``'kde'`` is a new option:
178+
179+
.. ipython:: python
180+
181+
s = Series(np.concatenate((np.random.randn(1000),
182+
np.random.randn(1000) * 0.5 + 3)))
183+
plt.figure()
184+
s.hist(normed=True, alpha=0.2)
185+
@savefig whatsnew_kde.png width=4.5in
186+
s.plot(kind='kde')
187+
188+
See :ref:`the plotting page <visualization.other>` for much more.
151189

152190
Other API changes
153191
~~~~~~~~~~~~~~~~~

doc/source/visualization.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ You can pass an ``ax`` argument to ``Series.plot`` to plot on a particular axis:
121121
@savefig series_plot_multi.png width=4.5in
122122
df['D'].plot(ax=axes[1,1]); axes[1,1].set_title('D')
123123
124+
.. _visualization.other:
124125

125126
Other plotting features
126127
-----------------------

doc/source/whatsnew.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ What's New
1616

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

19-
.. include:: whatsnew/v0.8.0.txt
19+
.. include:: v0.8.0.txt
2020

21-
.. include:: whatsnew/v0.7.3.txt
21+
.. include:: v0.7.3.txt
2222

23-
.. include:: whatsnew/v0.7.2.txt
23+
.. include:: v0.7.2.txt
2424

25-
.. include:: whatsnew/v0.7.1.txt
25+
.. include:: v0.7.1.txt
2626

27-
.. include:: whatsnew/v0.7.0.txt
27+
.. include:: v0.7.0.txt
2828

29-
.. include:: whatsnew/v0.6.1.txt
29+
.. include:: v0.6.1.txt
3030

31-
.. include:: whatsnew/v0.6.0.txt
31+
.. include:: v0.6.0.txt
3232

33-
.. include:: whatsnew/v0.5.0.txt
33+
.. include:: v0.5.0.txt
3434

35-
.. include:: whatsnew/v0.4.x.txt
35+
.. include:: v0.4.x.txt
3636

pandas/tseries/frequencies.py

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -259,23 +259,20 @@ def _get_freq_str(base, mult=1):
259259
}
260260

261261
need_suffix = ['QS', 'BQ', 'BQS', 'AS', 'BA', 'BAS']
262-
months = ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP',
263-
'OCT', 'NOV', 'DEC']
264-
for prefix in need_suffix:
265-
for m in months:
266-
_offset_to_period_map['%s-%s' % (prefix, m)] = \
267-
_offset_to_period_map[prefix]
268-
269-
months = ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP',
270-
'OCT', 'NOV', 'DEC']
271-
for prefix in ['A', 'Q']:
272-
for m in months:
273-
alias = '%s-%s' % (prefix, m)
274-
_offset_to_period_map[alias] = alias
262+
_months = ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP',
263+
'OCT', 'NOV', 'DEC']
264+
for __prefix in need_suffix:
265+
for _m in _months:
266+
_offset_to_period_map['%s-%s' % (__prefix, _m)] = \
267+
_offset_to_period_map[__prefix]
268+
for __prefix in ['A', 'Q']:
269+
for _m in _months:
270+
_alias = '%s-%s' % (__prefix, _m)
271+
_offset_to_period_map[_alias] = _alias
275272

276273
_days = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']
277-
for d in _days:
278-
_offset_to_period_map['W-%s' % d] = 'W-%s' % d
274+
for _d in _days:
275+
_offset_to_period_map['W-%s' % _d] = 'W-%s' % _d
279276

280277
def get_period_alias(offset_str):
281278
""" alias to closest period strings BQ->Q etc"""
@@ -322,11 +319,11 @@ def get_period_alias(offset_str):
322319
'us': 'U'
323320
}
324321

325-
for i, weekday in enumerate(['MON', 'TUE', 'WED', 'THU', 'FRI']):
326-
for iweek in xrange(4):
327-
name = 'WOM-%d%s' % (iweek + 1, weekday)
328-
_offset_map[name] = offsets.WeekOfMonth(week=iweek, weekday=i)
329-
_rule_aliases[name.replace('-', '@')] = name
322+
for _i, _weekday in enumerate(['MON', 'TUE', 'WED', 'THU', 'FRI']):
323+
for _iweek in xrange(4):
324+
_name = 'WOM-%d%s' % (_iweek + 1, _weekday)
325+
_offset_map[_name] = offsets.WeekOfMonth(week=_iweek, weekday=_i)
326+
_rule_aliases[_name.replace('-', '@')] = _name
330327

331328
_legacy_reverse_map = dict((v, k) for k, v in _rule_aliases.iteritems())
332329

@@ -562,8 +559,8 @@ def get_standard_freq(freq):
562559
}
563560

564561
_reverse_period_code_map = {}
565-
for k, v in _period_code_map.iteritems():
566-
_reverse_period_code_map[v] = k
562+
for _k, _v in _period_code_map.iteritems():
563+
_reverse_period_code_map[_v] = _k
567564

568565
# Additional aliases
569566
_period_code_map.update({

0 commit comments

Comments
 (0)