Skip to content

Commit 4ebd97b

Browse files
committed
Merge branch 'master' of https://github.com/pandas-dev/pandas into doc-decorator
2 parents 4c9dc28 + c8db9b9 commit 4ebd97b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+538
-359
lines changed

asv_bench/benchmarks/frame_methods.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ def setup(self):
564564

565565
def time_frame_get_dtype_counts(self):
566566
with warnings.catch_warnings(record=True):
567-
self.df._data.get_dtype_counts()
567+
self.df.dtypes.value_counts()
568568

569569
def time_info(self):
570570
self.df.info()

doc/source/getting_started/intro_tutorials/10_text_data.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ names in the ``Name`` column. By using pandas string methods, the
199199
200200
Next, we need to get the corresponding location, preferably the index
201201
label, in the table for which the name length is the largest. The
202-
:meth:`~Series.idxmax`` method does exactly that. It is not a string method and is
202+
:meth:`~Series.idxmax` method does exactly that. It is not a string method and is
203203
applied to integers, so no ``str`` is used.
204204

205205
.. ipython:: python

doc/source/user_guide/computation.rst

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,15 +312,35 @@ We provide a number of common statistical functions:
312312
:meth:`~Rolling.median`, Arithmetic median of values
313313
:meth:`~Rolling.min`, Minimum
314314
:meth:`~Rolling.max`, Maximum
315-
:meth:`~Rolling.std`, Bessel-corrected sample standard deviation
316-
:meth:`~Rolling.var`, Unbiased variance
315+
:meth:`~Rolling.std`, Sample standard deviation
316+
:meth:`~Rolling.var`, Sample variance
317317
:meth:`~Rolling.skew`, Sample skewness (3rd moment)
318318
:meth:`~Rolling.kurt`, Sample kurtosis (4th moment)
319319
:meth:`~Rolling.quantile`, Sample quantile (value at %)
320320
:meth:`~Rolling.apply`, Generic apply
321321
:meth:`~Rolling.cov`, Unbiased covariance (binary)
322322
:meth:`~Rolling.corr`, Correlation (binary)
323323

324+
.. _computation.window_variance.caveats:
325+
326+
.. note::
327+
328+
Please note that :meth:`~Rolling.std` and :meth:`~Rolling.var` use the sample
329+
variance formula by default, i.e. the sum of squared differences is divided by
330+
``window_size - 1`` and not by ``window_size`` during averaging. In statistics,
331+
we use sample when the dataset is drawn from a larger population that we
332+
don't have access to. Using it implies that the data in our window is a
333+
random sample from the population, and we are interested not in the variance
334+
inside the specific window but in the variance of some general window that
335+
our windows represent. In this situation, using the sample variance formula
336+
results in an unbiased estimator and so is preferred.
337+
338+
Usually, we are instead interested in the variance of each window as we slide
339+
it over the data, and in this case we should specify ``ddof=0`` when calling
340+
these methods to use population variance instead of sample variance. Using
341+
sample variance under the circumstances would result in a biased estimator
342+
of the variable we are trying to determine.
343+
324344
.. _stats.rolling_apply:
325345

326346
Rolling apply
@@ -848,15 +868,22 @@ Method summary
848868
:meth:`~Expanding.median`, Arithmetic median of values
849869
:meth:`~Expanding.min`, Minimum
850870
:meth:`~Expanding.max`, Maximum
851-
:meth:`~Expanding.std`, Unbiased standard deviation
852-
:meth:`~Expanding.var`, Unbiased variance
871+
:meth:`~Expanding.std`, Sample standard deviation
872+
:meth:`~Expanding.var`, Sample variance
853873
:meth:`~Expanding.skew`, Unbiased skewness (3rd moment)
854874
:meth:`~Expanding.kurt`, Unbiased kurtosis (4th moment)
855875
:meth:`~Expanding.quantile`, Sample quantile (value at %)
856876
:meth:`~Expanding.apply`, Generic apply
857877
:meth:`~Expanding.cov`, Unbiased covariance (binary)
858878
:meth:`~Expanding.corr`, Correlation (binary)
859879

880+
.. note::
881+
882+
Using sample variance formulas for :meth:`~Expanding.std` and
883+
:meth:`~Expanding.var` comes with the same caveats as using them with rolling
884+
windows. See :ref:`this section <computation.window_variance.caveats>` for more
885+
information.
886+
860887
.. currentmodule:: pandas
861888

862889
Aside from not having a ``window`` parameter, these functions have the same

doc/source/whatsnew/v0.14.0.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _whatsnew_0140:
22

3-
v0.14.0 (May 31 , 2014)
4-
-----------------------
3+
Version 0.14.0 (May 31 , 2014)
4+
------------------------------
55

66
{{ header }}
77

@@ -321,7 +321,7 @@ Text parsing API changes
321321

322322
.. _whatsnew_0140.groupby:
323323

324-
Groupby API changes
324+
GroupBy API changes
325325
~~~~~~~~~~~~~~~~~~~
326326

327327
More consistent behavior for some groupby methods:
@@ -473,8 +473,8 @@ Some other enhancements to the sql functions include:
473473

474474
.. _whatsnew_0140.slicers:
475475

476-
Multiindexing using slicers
477-
~~~~~~~~~~~~~~~~~~~~~~~~~~~
476+
Multi-indexing using slicers
477+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
478478

479479
In 0.14.0 we added a new way to slice MultiIndexed objects.
480480
You can slice a MultiIndex by providing multiple indexers.

doc/source/whatsnew/v0.14.1.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _whatsnew_0141:
22

3-
v0.14.1 (July 11, 2014)
4-
-----------------------
3+
Version 0.14.1 (July 11, 2014)
4+
------------------------------
55

66
{{ header }}
77

doc/source/whatsnew/v0.15.0.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _whatsnew_0150:
22

3-
v0.15.0 (October 18, 2014)
4-
--------------------------
3+
Version 0.15.0 (October 18, 2014)
4+
---------------------------------
55

66
{{ header }}
77

@@ -105,7 +105,7 @@ For full docs, see the :ref:`categorical introduction <categorical>` and the
105105

106106
.. _whatsnew_0150.timedeltaindex:
107107

108-
TimedeltaIndex/Scalar
108+
TimedeltaIndex/scalar
109109
^^^^^^^^^^^^^^^^^^^^^
110110

111111
We introduce a new scalar type ``Timedelta``, which is a subclass of ``datetime.timedelta``, and behaves in a similar manner,
@@ -247,8 +247,8 @@ Additionally :meth:`~pandas.DataFrame.memory_usage` is an available method for a
247247
248248
.. _whatsnew_0150.dt:
249249

250-
.dt accessor
251-
^^^^^^^^^^^^
250+
Series.dt accessor
251+
^^^^^^^^^^^^^^^^^^
252252

253253
``Series`` has gained an accessor to succinctly return datetime like properties for the *values* of the Series, if its a datetime/period like Series. (:issue:`7207`)
254254
This will return a Series, indexed like the existing Series. See the :ref:`docs <basics.dt_accessors>`
@@ -600,7 +600,7 @@ Rolling/expanding moments improvements
600600

601601
.. _whatsnew_0150.sql:
602602

603-
Improvements in the SQL io module
603+
Improvements in the SQL IO module
604604
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
605605

606606
- Added support for a ``chunksize`` parameter to ``to_sql`` function. This allows DataFrame to be written in chunks and avoid packet-size overflow errors (:issue:`8062`).

doc/source/whatsnew/v0.15.1.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _whatsnew_0151:
22

3-
v0.15.1 (November 9, 2014)
4-
--------------------------
3+
Version 0.15.1 (November 9, 2014)
4+
---------------------------------
55

66
{{ header }}
77

doc/source/whatsnew/v0.15.2.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _whatsnew_0152:
22

3-
v0.15.2 (December 12, 2014)
4-
---------------------------
3+
Version 0.15.2 (December 12, 2014)
4+
----------------------------------
55

66
{{ header }}
77

doc/source/whatsnew/v0.16.0.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _whatsnew_0160:
22

3-
v0.16.0 (March 22, 2015)
4-
------------------------
3+
Version 0.16.0 (March 22, 2015)
4+
-------------------------------
55

66
{{ header }}
77

@@ -218,7 +218,7 @@ Backwards incompatible API changes
218218

219219
.. _whatsnew_0160.api_breaking.timedelta:
220220

221-
Changes in Timedelta
221+
Changes in timedelta
222222
^^^^^^^^^^^^^^^^^^^^
223223

224224
In v0.15.0 a new scalar type ``Timedelta`` was introduced, that is a

doc/source/whatsnew/v0.16.1.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.. _whatsnew_0161:
22

3-
v0.16.1 (May 11, 2015)
4-
----------------------
3+
Version 0.16.1 (May 11, 2015)
4+
-----------------------------
55

66
{{ header }}
77

0 commit comments

Comments
 (0)