Skip to content

Commit 914349a

Browse files
committed
minor updates
1 parent c966562 commit 914349a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

doc/source/user_guide/text.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ Or ``astype`` after the ``Series`` or ``DataFrame`` is created
6666
6767
.. versionchanged:: 1.1.0
6868

69-
You can also use ``string`` dtype on non-string data and it will be converted to
70-
``string`` dtype:
69+
You can also use :class:`StringDtype`/``"string"`` as the dtype on non-string data and
70+
it will be converted to ``string`` dtype:
7171

7272
.. ipython:: python
7373
@@ -77,6 +77,8 @@ You can also use ``string`` dtype on non-string data and it will be converted to
7777
7878
or convert from existing pandas data:
7979

80+
.. ipython:: python
81+
8082
s1 = pd.Series([1,2, np.nan], dtype="Int64")
8183
s1
8284
s2 = s1.astype("string")

doc/source/whatsnew/v1.1.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ All dtypes can now be converted to ``StringDtype``
2121
Previously, declaring or converting to :class:`StringDtype` was in general only possible if the data was already only ``str`` or nan-like (:issue:`31204`).
2222
:class:`StringDtype` now works in all situations where ``astype(str)`` or ``dtype=str`` work:
2323

24-
For example the below now work:
24+
For example, the below now works:
2525

2626
.. ipython:: python
2727

0 commit comments

Comments
 (0)