Skip to content

Commit feb6870

Browse files
committed
DOC: v0.15.0.txt edits
1 parent 69fe8b3 commit feb6870

File tree

1 file changed

+68
-79
lines changed

1 file changed

+68
-79
lines changed

doc/source/v0.15.0.txt

+68-79
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ users upgrade to this version.
2525

2626
- :ref:`Other Enhancements <whatsnew_0150.enhancements>`
2727

28-
- :ref:`API Changes <whatsnew_0150.api>`, and :ref:`Rolling/expanding moments API Changes <whatsnew_0150.roll>`
28+
- :ref:`API Changes <whatsnew_0150.api>`, and :ref:`Rolling/Expanding Moments API Changes <whatsnew_0150.roll>`
2929

3030
- :ref:`Performance Improvements <whatsnew_0150.performance>`
3131

@@ -63,8 +63,7 @@ API changes
6363

6464
- Made both the C-based and Python engines for `read_csv` and `read_table` ignore empty lines in input as well as
6565
whitespace-filled lines, as long as `sep` is not whitespace. This is an API change
66-
that can be controlled by the keyword parameter `skip_blank_lines`.
67-
(:issue:`4466`, see :ref:`skiplines <_io.skiplines>`)
66+
that can be controlled by the keyword parameter `skip_blank_lines`. see :ref:`here <io.skiplines>`(:issue:`4466`)
6867

6968
- Bug in passing a ``DatetimeIndex`` with a timezone that was not being retained in DataFrame construction from a dict (:issue:`7822`)
7069

@@ -159,8 +158,8 @@ API changes
159158

160159
In prior versions there was a difference in these two constructs:
161160

162-
- ``df.loc[[3]]`` would (prior to 0.15.0) return a frame reindexed by 3 (with all ``np.nan`` values)
163-
- ``df.loc[[3],:]`` would raise ``KeyError``.
161+
- ``df.loc[[3]]`` would (prior to 0.15.0) return a frame reindexed by 3 (with all ``np.nan`` values)
162+
- ``df.loc[[3],:]`` would raise ``KeyError``.
164163

165164
Both will now raise a ``KeyError``. The rule is that *at least 1* indexer must be found when using a list-like and ``.loc`` (:issue:`7999`)
166165

@@ -242,8 +241,7 @@ API changes
242241
df
243242
df.dtypes
244243

245-
- ``Series.to_csv()`` now returns a string when ``path=None``, matching the behaviour of
246-
``DataFrame.to_csv()`` (:issue:`8215`).
244+
- ``Series.to_csv()`` now returns a string when ``path=None``, matching the behaviour of ``DataFrame.to_csv()`` (:issue:`8215`).
247245

248246
.. _whatsnew_0150.index_set_ops:
249247

@@ -265,6 +263,10 @@ API changes
265263
# should be replaced by
266264
Index(['a','b','c']).difference(Index(['b','c','d']))
267265

266+
- ``tz_localize`` now accepts the ``ambiguous`` keyword which allows for passing an array of bools
267+
indicating whether the date belongs in DST or not, 'NaT' for setting transition times to NaT,
268+
'infer' for inferring DST/non-DST, and 'raise' (default) for an AmbiguousTimeError to be raised. See :ref:`the docs<timeseries.timezone_ambiguous>` for more details (:issue:`7943`)
269+
268270
- ``DataFrame.info()`` now ends its output with a newline character (:issue:`8114`)
269271

270272
.. _whatsnew_0150.dt:
@@ -320,7 +322,7 @@ The ``.dt`` accessor works for period and timedelta dtypes.
320322

321323
.. _whatsnew_0150.roll:
322324

323-
Rolling/exapnding moments API changes
325+
Rolling/Expanding Moments API changes
324326
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
325327

326328
- :func:`rolling_min`, :func:`rolling_max`, :func:`rolling_cov`, and :func:`rolling_corr`
@@ -433,6 +435,60 @@ Rolling/exapnding moments API changes
433435
ewma(Series([1., None, 8.]), com=2., ignore_na=True) # pre-0.15.0 behavior
434436
ewma(Series([1., None, 8.]), com=2., ignore_na=False) # new default
435437

438+
- Bug in :func:`expanding_cov`, :func:`expanding_corr`, :func:`rolling_cov`, :func:`rolling_cor`, :func:`ewmcov`, and :func:`ewmcorr`
439+
returning results with columns sorted by name and producing an error for non-unique columns;
440+
now handles non-unique columns and returns columns in original order
441+
(except for the case of two DataFrames with ``pairwise=False``, where behavior is unchanged) (:issue:`7542`)
442+
- Bug in :func:`rolling_count` and ``expanding_*`` functions unnecessarily producing error message for zero-length data (:issue:`8056`)
443+
- Bug in :func:`rolling_apply` and :func:`expanding_apply` interpreting ``min_periods=0`` as ``min_periods=1`` (:issue:`8080`)
444+
- Bug in :func:`expanding_std` and :func:`expanding_var` for a single value producing a confusing error message (:issue:`7900`)
445+
- Bug in :func:`rolling_std` and :func:`rolling_var` for a single value producing ``0`` rather than ``NaN`` (:issue:`7900`)
446+
447+
- Bug in :func:`ewmstd`, :func:`ewmvol`, :func:`ewmvar`, and :func:`ewmcov`
448+
calculation of de-biasing factors when ``bias=False`` (the default).
449+
Previously an incorrect constant factor was used, based on ``adjust=True``, ``ignore_na=True``,
450+
and an infinite number of observations.
451+
Now a different factor is used for each entry, based on the actual weights
452+
(analogous to the usual ``N/(N-1)`` factor).
453+
In particular, for a single point a value of ``NaN`` is returned when ``bias=False``,
454+
whereas previously a value of (approximately) ``0`` was returned.
455+
456+
For example, consider the following pre-0.15.0 results for ``ewmvar(..., bias=False)``,
457+
and the corresponding debiasing factors:
458+
459+
.. ipython:: python
460+
461+
s = Series([1., 2., 0., 4.])
462+
463+
.. code-block:: python
464+
465+
In [69]: ewmvar(s, com=2., bias=False)
466+
Out[69]:
467+
0 -2.775558e-16
468+
1 3.000000e-01
469+
2 9.556787e-01
470+
3 3.585799e+00
471+
dtype: float64
472+
473+
In [70]: ewmvar(s, com=2., bias=False) / ewmvar(s, com=2., bias=True)
474+
Out[70]:
475+
0 1.25
476+
1 1.25
477+
2 1.25
478+
3 1.25
479+
dtype: float64
480+
481+
Note that entry ``0`` is approximately 0, and the debiasing factors are a constant 1.25.
482+
By comparison, the following 0.15.0 results have a ``NaN`` for entry ``0``,
483+
and the debiasing factors are decreasing (towards 1.25):
484+
485+
.. ipython:: python
486+
487+
ewmvar(s, com=2., bias=False)
488+
ewmvar(s, com=2., bias=False) / ewmvar(s, com=2., bias=True)
489+
490+
See :ref:`Exponentially weighted moment functions <stats.moments.exponentially_weighted>` for details. (:issue:`7912`)
491+
436492
.. _whatsnew_0150.refactoring:
437493

438494
Internal Refactoring
@@ -655,15 +711,14 @@ Enhancements
655711

656712
- ``Period`` and ``PeriodIndex`` supports addition/subtraction with ``timedelta``-likes (:issue:`7966`)
657713

658-
If ``Period`` freq is ``D``, ``H``, ``T``, ``S``, ``L``, ``U``, ``N``, ``timedelta``-like can be added if the result can have same freq. Otherwise, only the same ``offsets`` can be added.
714+
If ``Period`` freq is ``D``, ``H``, ``T``, ``S``, ``L``, ``U``, ``N``, ``Timedelta``-like can be added if the result can have same freq. Otherwise, only the same ``offsets`` can be added.
659715

660716
.. ipython:: python
661717

662718
idx = pd.period_range('2014-07-01 09:00', periods=5, freq='H')
663719
idx
664720
idx + pd.offsets.Hour(2)
665-
idx + timedelta(minutes=120)
666-
idx + np.timedelta64(7200, 's')
721+
idx + Timedelta('120m')
667722

668723
idx = pd.period_range('2014-07', periods=5, freq='M')
669724
idx
@@ -686,16 +741,6 @@ Enhancements
686741

687742

688743

689-
- ``tz_localize`` now accepts the ``ambiguous`` keyword which allows for passing an array of bools
690-
indicating whether the date belongs in DST or not, 'NaT' for setting transition times to NaT,
691-
'infer' for inferring DST/non-DST, and 'raise' (default) for an AmbiguousTimeError to be raised (:issue:`7943`).
692-
See :ref:`the docs<timeseries.timezone_ambiguous>` for more details.
693-
694-
695-
696-
697-
698-
699744
.. _whatsnew_0150.performance:
700745

701746
Performance
@@ -777,60 +822,6 @@ Bug Fixes
777822
- Bug in ``StataReader`` which did not read variable labels in 117 files due to difference between Stata documentation and implementation (:issue:`7816`)
778823
- Bug in ``StataReader`` where strings were always converted to 244 characters-fixed width irrespective of underlying string size (:issue:`7858`)
779824

780-
- Bug in :func:`expanding_cov`, :func:`expanding_corr`, :func:`rolling_cov`, :func:`rolling_cor`, :func:`ewmcov`, and :func:`ewmcorr`
781-
returning results with columns sorted by name and producing an error for non-unique columns;
782-
now handles non-unique columns and returns columns in original order
783-
(except for the case of two DataFrames with ``pairwise=False``, where behavior is unchanged) (:issue:`7542`)
784-
- Bug in :func:`rolling_count` and ``expanding_*`` functions unnecessarily producing error message for zero-length data (:issue:`8056`)
785-
- Bug in :func:`rolling_apply` and :func:`expanding_apply` interpreting ``min_periods=0`` as ``min_periods=1`` (:issue:`8080`)
786-
- Bug in :func:`expanding_std` and :func:`expanding_var` for a single value producing a confusing error message (:issue:`7900`)
787-
- Bug in :func:`rolling_std` and :func:`rolling_var` for a single value producing ``0`` rather than ``NaN`` (:issue:`7900`)
788-
789-
- Bug in :func:`ewmstd`, :func:`ewmvol`, :func:`ewmvar`, and :func:`ewmcov`
790-
calculation of de-biasing factors when ``bias=False`` (the default).
791-
Previously an incorrect constant factor was used, based on ``adjust=True``, ``ignore_na=True``,
792-
and an infinite number of observations.
793-
Now a different factor is used for each entry, based on the actual weights
794-
(analogous to the usual ``N/(N-1)`` factor).
795-
In particular, for a single point a value of ``NaN`` is returned when ``bias=False``,
796-
whereas previously a value of (approximately) ``0`` was returned.
797-
798-
For example, consider the following pre-0.15.0 results for ``ewmvar(..., bias=False)``,
799-
and the corresponding debiasing factors:
800-
801-
.. ipython:: python
802-
803-
s = Series([1., 2., 0., 4.])
804-
805-
.. code-block:: python
806-
807-
In [69]: ewmvar(s, com=2., bias=False)
808-
Out[69]:
809-
0 -2.775558e-16
810-
1 3.000000e-01
811-
2 9.556787e-01
812-
3 3.585799e+00
813-
dtype: float64
814-
815-
In [70]: ewmvar(s, com=2., bias=False) / ewmvar(s, com=2., bias=True)
816-
Out[70]:
817-
0 1.25
818-
1 1.25
819-
2 1.25
820-
3 1.25
821-
dtype: float64
822-
823-
Note that entry ``0`` is approximately 0, and the debiasing factors are a constant 1.25.
824-
By comparison, the following 0.15.0 results have a ``NaN`` for entry ``0``,
825-
and the debiasing factors are decreasing (towards 1.25):
826-
827-
.. ipython:: python
828-
829-
ewmvar(s, com=2., bias=False)
830-
ewmvar(s, com=2., bias=False) / ewmvar(s, com=2., bias=True)
831-
832-
See :ref:`Exponentially weighted moment functions <stats.moments.exponentially_weighted>` for details. (:issue:`7912`)
833-
834825
- Bug in ``DataFrame.plot`` and ``Series.plot`` may ignore ``rot`` and ``fontsize`` keywords (:issue:`7844`)
835826

836827

@@ -929,9 +920,7 @@ Bug Fixes
929920
- Bug in ``DataFrame.__setitem__`` that caused errors when setting a dataframe column to a sparse array (:issue:`8131`)
930921
- Bug where ``Dataframe.boxplot()`` failed when entire column was empty (:issue:`8181`).
931922
- Bug with messed variables in ``radviz`` visualization (:issue:`8199`).
932-
- Bug in interpolation methods with the ``limit`` keyword when no values
933-
needed interpolating (:issue:`7173`).
934-
- Bug where ``col_space`` was ignored in ``DataFrame.to_string()`` when ``header=False``
935-
(:issue:`8230`).
923+
- Bug in interpolation methods with the ``limit`` keyword when no values needed interpolating (:issue:`7173`).
924+
- Bug where ``col_space`` was ignored in ``DataFrame.to_string()`` when ``header=False`` (:issue:`8230`).
936925

937926
- Bug in DataFrame terminal display: Setting max_column/max_rows to zero did not trigger auto-resizing of dfs to fit terminal width/height (:issue:`7180`).

0 commit comments

Comments
 (0)