@@ -80,16 +80,16 @@ Other enhancements
80
80
81
81
.. _whatsnew_0170.api:
82
82
83
- Backwards incompatible API changes
84
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
85
-
86
83
.. _whatsnew_0170.api_breaking:
87
84
88
- .. _whatsnew_0170.api_breaking.other:
85
+ Backwards incompatible API changes
86
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89
87
90
- .. _whatsnew_0170.api_breaking.convert_objects:
91
88
Changes to convert_objects
92
89
^^^^^^^^^^^^^^^^^^^^^^^^^^
90
+
91
+ .. _whatsnew_0170.api_breaking.convert_objects:
92
+
93
93
- ``DataFrame.convert_objects`` keyword arguments have been shortened. (:issue:`10265`)
94
94
95
95
===================== =============
@@ -101,8 +101,8 @@ Old New
101
101
===================== =============
102
102
103
103
- Coercing types with ``DataFrame.convert_objects`` is now implemented using the
104
- keyword argument ``coerce=True``. Previously types were coerced by setting a
105
- keyword argument to ``'coerce'`` instead of ``True``, as in ``convert_dates='coerce'``.
104
+ keyword argument ``coerce=True``. Previously types were coerced by setting a
105
+ keyword argument to ``'coerce'`` instead of ``True``, as in ``convert_dates='coerce'``.
106
106
107
107
.. ipython:: python
108
108
@@ -125,7 +125,7 @@ keyword argument to ``'coerce'`` instead of ``True``, as in ``convert_dates='coe
125
125
df.convert_objects(numeric=True, coerce=True)
126
126
127
127
- In earlier versions of pandas, ``DataFrame.convert_objects`` would not coerce
128
- numeric types when there were no values convertible to a numeric type. For example,
128
+ numeric types when there were no values convertible to a numeric type. For example,
129
129
130
130
.. code-block:: python
131
131
@@ -136,21 +136,22 @@ numeric types when there were no values convertible to a numeric type. For exam
136
136
0 a
137
137
1 b
138
138
139
- returns the original DataFrame with no conversion. This change alters
140
- this behavior so that
139
+ returns the original DataFrame with no conversion. This change alters
140
+ this behavior so that
141
141
142
142
.. ipython:: python
143
143
144
144
pd.DataFrame({'s': ['a','b']})
145
145
df.convert_objects(numeric=True, coerce=True)
146
146
147
- converts all non-number-like strings to ``NaN``.
147
+ converts all non-number-like strings to ``NaN``.
148
148
149
149
- In earlier versions of pandas, the default behavior was to try and convert
150
- datetimes and timestamps. The new default is for ``DataFrame.convert_objects``
151
- to do nothing, and so it is necessary to pass at least one conversion target
152
- in the method call.
150
+ datetimes and timestamps. The new default is for ``DataFrame.convert_objects``
151
+ to do nothing, and so it is necessary to pass at least one conversion target
152
+ in the method call.
153
153
154
+ .. _whatsnew_0170.api_breaking.other:
154
155
155
156
Other API Changes
156
157
^^^^^^^^^^^^^^^^^
0 commit comments