@@ -58,9 +58,12 @@ API changes
58
58
# and all methods take an inplace kwarg - but return None
59
59
index.set_names(["bob", "cranberry"], inplace=True)
60
60
61
- - **All** division with ``NDFrame`` - likes is now truedivision, regardless
62
- of the future import. You can use ``//`` and ``floordiv`` to do integer
63
- division.
61
+ - **All** division with ``NDFrame`` objects is now *truedivision*, regardless
62
+ of the future import. This means that operating on pandas objects will by default
63
+ use *floating point* division, and return a floating point dtype.
64
+ You can use ``//`` and ``floordiv`` to do integer division.
65
+
66
+ Integer division
64
67
65
68
.. code-block:: python
66
69
@@ -71,8 +74,20 @@ API changes
71
74
In [5]: arr / arr2
72
75
Out[5]: array([0, 0, 1, 4])
73
76
74
- In [6]: pd. Series(arr) / pd. Series(arr2) # no future import required
77
+ In [6]: Series(arr) // Series(arr2)
75
78
Out[6]:
79
+ 0 0
80
+ 1 0
81
+ 2 1
82
+ 3 4
83
+ dtype: int64
84
+
85
+ True Division
86
+
87
+ .. code-block:: python
88
+
89
+ In [7]: pd.Series(arr) / pd.Series(arr2) # no future import required
90
+ Out[7]:
76
91
0 0.200000
77
92
1 0.666667
78
93
2 1.500000
@@ -146,6 +161,7 @@ These were announced changes in 0.12 or prior that are taking effect as of 0.13.
146
161
- Remove deprecated ``set_printoptions/reset_printoptions`` (:issue:`3046`)
147
162
- Remove deprecated ``_verbose_info`` (:issue:`3215`)
148
163
- Remove deprecated ``read_clipboard/to_clipboard/ExcelFile/ExcelWriter`` from ``pandas.io.parsers`` (:issue:`3717`)
164
+ These are available as functions in the main pandas namespace (e.g. ``pd.read_clipboard``)
149
165
- default for ``tupleize_cols`` is now ``False`` for both ``to_csv`` and ``read_csv``. Fair warning in 0.12 (:issue:`3604`)
150
166
151
167
Deprecations
@@ -169,7 +185,7 @@ Indexing API Changes
169
185
~~~~~~~~~~~~~~~~~~~~
170
186
171
187
Prior to 0.13, it was impossible to use a label indexer (``.loc/.ix``) to set a value that
172
- was not contained in the index of a particular axis. (:issue:`2578`). See more :ref:`the docs<indexing.basics.partial_setting>`
188
+ was not contained in the index of a particular axis. (:issue:`2578`). See :ref:`the docs<indexing.basics.partial_setting>`
173
189
174
190
In the ``Series`` case this is effectively an appending operation
175
191
@@ -420,7 +436,7 @@ Enhancements
420
436
get_dummies([1, 2, np.nan], dummy_na=True)
421
437
422
438
423
- - ``timedelta64[ns]`` operations. See :ref:`the docs<timeseries.timedeltas_convert>` for the docs .
439
+ - ``timedelta64[ns]`` operations. See :ref:`the docs<timeseries.timedeltas_convert>`.
424
440
425
441
.. warning::
426
442
@@ -478,8 +494,7 @@ Enhancements
478
494
td.fillna(0)
479
495
td.fillna(timedelta(days=1,seconds=5))
480
496
481
- You can do numeric reduction operations on timedeltas. Note that these will return
482
- a single-element Series.
497
+ You can do numeric reduction operations on timedeltas.
483
498
484
499
.. ipython:: python
485
500
@@ -584,7 +599,7 @@ Enhancements
584
599
- ``tz_localize`` can infer a fall daylight savings transition based on the structure
585
600
of the unlocalized data (:issue:`4230`), see :ref:`the docs<timeseries.timezone>`
586
601
587
- - DatetimeIndex is now in the API documentation, see :ref:`the docs<api.datetimeindex>`
602
+ - `` DatetimeIndex`` is now in the API documentation, see :ref:`the docs<api.datetimeindex>`
588
603
589
604
- :meth:`~pandas.io.json.json_normalize` is a new method to allow you to create a flat table
590
605
from semi-structured JSON data. See :ref:`the docs<io.json_normalize>` (:issue:`1067`)
@@ -593,11 +608,14 @@ Enhancements
593
608
594
609
- Python csv parser now supports usecols (:issue:`4335`)
595
610
596
- - DataFrame has a new ``interpolate`` method, similar to Series (:issue:`4434`, :issue:`1892`)
597
- - Added ``LastWeekOfMonth`` DateOffset (:issue:`4637`)
598
- - Added ``FY5253``, and ``FY5253Quarter`` DateOffsets (:issue:`4511`)
611
+ - Frequencies gained several new offsets:
612
+
613
+ * ``LastWeekOfMonth`` (:issue:`4637`)
614
+ * ``FY5253``, and ``FY5253Quarter`` (:issue:`4511`)
599
615
600
616
617
+ - DataFrame has a new ``interpolate`` method, similar to Series (:issue:`4434`, :issue:`1892`)
618
+
601
619
.. ipython:: python
602
620
603
621
df = DataFrame({'A': [1, 2.1, np.nan, 4.7, 5.6, 6.8],
@@ -618,12 +636,10 @@ Enhancements
618
636
ser = Series([1, 3, np.nan, np.nan, np.nan, 11])
619
637
ser.interpolate(limit=2)
620
638
621
- - Added ``wide_to_long`` panel data convenience function.
639
+ - Added ``wide_to_long`` panel data convenience function. See :ref:`the docs<reshaping.melt>`.
622
640
623
641
.. ipython:: python
624
642
625
- import pandas as pd
626
- import numpy as np
627
643
np.random.seed(123)
628
644
df = pd.DataFrame({"A1970" : {0 : "a", 1 : "b", 2 : "c"},
629
645
"A1980" : {0 : "d", 1 : "e", 2 : "f"},
@@ -887,15 +903,8 @@ to unify methods and behaviors. Series formerly subclassed directly from
887
903
888
904
- Reindex called with no arguments will now return a copy of the input object
889
905
890
- - Series now inherits from ``NDFrame`` rather than directly from ``ndarray``.
891
- There are several minor changes that affect the API.
892
-
893
- - numpy functions that do not support the array interface will now
894
- return ``ndarrays`` rather than series, e.g. ``np.diff`` and ``np.ones_like``
895
- - ``Series(0.5)`` would previously return the scalar ``0.5``, this is no
896
- longer supported
897
- - ``TimeSeries`` is now an alias for ``Series``. the property ``is_time_series``
898
- can be used to distinguish (if desired)
906
+ - ``TimeSeries`` is now an alias for ``Series``. the property ``is_time_series``
907
+ can be used to distinguish (if desired)
899
908
900
909
- Refactor of Sparse objects to use BlockManager
901
910
0 commit comments