You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ``use_nullable_dtypes`` keyword argument has been expanded to the following functions to enable automatic conversion to nullable dtypes (:issue:`36712`)
37
37
@@ -41,7 +41,7 @@ The ``use_nullable_dtypes`` keyword argument has been expanded to the following
41
41
* :func:`read_sql_query`
42
42
* :func:`read_sql_table`
43
43
44
-
Additionally a new global configuration, ``mode.nullable_backend`` can now be used in conjunction with the parameter ``use_nullable_dtypes=True`` in the following functions
44
+
Additionally a new global configuration, ``mode.dtype_backend`` can now be used in conjunction with the parameter ``use_nullable_dtypes=True`` in the following functions
45
45
to select the nullable dtypes implementation.
46
46
47
47
* :func:`read_csv` (with ``engine="pyarrow"`` or ``engine="python"``)
@@ -50,12 +50,12 @@ to select the nullable dtypes implementation.
50
50
* :func:`read_orc`
51
51
52
52
53
-
And the following methods will also utilize the ``mode.nullable_backend`` option.
53
+
And the following methods will also utilize the ``mode.dtype_backend`` option.
54
54
55
55
* :meth:`DataFrame.convert_dtypes`
56
56
* :meth:`Series.convert_dtypes`
57
57
58
-
By default, ``mode.nullable_backend`` is set to ``"pandas"`` to return existing, numpy-backed nullable dtypes, but it can also
58
+
By default, ``mode.dtype_backend`` is set to ``"pandas"`` to return existing, numpy-backed nullable dtypes, but it can also
59
59
be set to ``"pyarrow"`` to return pyarrow-backed, nullable :class:`ArrowDtype` (:issue:`48957`, :issue:`49997`).
60
60
61
61
.. ipython:: python
@@ -65,12 +65,12 @@ be set to ``"pyarrow"`` to return pyarrow-backed, nullable :class:`ArrowDtype` (
65
65
1,2.5,True,a,,,,,
66
66
3,4.5,False,b,6,7.5,True,a,
67
67
""")
68
-
with pd.option_context("mode.nullable_backend", "pandas"):
68
+
with pd.option_context("mode.dtype_backend", "pandas"):
69
69
df = pd.read_csv(data, use_nullable_dtypes=True)
70
70
df.dtypes
71
71
72
72
data.seek(0)
73
-
with pd.option_context("mode.nullable_backend", "pyarrow"):
73
+
with pd.option_context("mode.dtype_backend", "pyarrow"):
0 commit comments