Skip to content

Commit fa9c7de

Browse files
jorisvandenbosschejreback
authored andcommitted
DOC: import StringIO from io instead of pandas.compat (#25997)
1 parent fc5f292 commit fa9c7de

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

doc/source/user_guide/cookbook.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@ Option 1: pass rows explicitly to skip rows
10451045

10461046
.. ipython:: python
10471047
1048-
from pandas.compat import StringIO
1048+
from io import StringIO
10491049
10501050
pd.read_csv(StringIO(data), sep=';', skiprows=[11, 12],
10511051
index_col=0, parse_dates=True, header=10)

doc/source/user_guide/io.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ usecols : list-like or callable, default ``None``
137137

138138
.. ipython:: python
139139
140-
from pandas.compat import StringIO, BytesIO
140+
from io import StringIO, BytesIO
141141
data = ('col1,col2,col3\n'
142142
'a,b,1\n'
143143
'a,b,2\n'

doc/source/whatsnew/v0.19.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ default of the index) in a DataFrame.
192192
.. ipython:: python
193193
:suppress:
194194
195-
from pandas.compat import StringIO
195+
from io import StringIO
196196
197197
:ref:`Duplicate column names <io.dupe_names>` are now supported in :func:`read_csv` whether
198198
they are in the file or passed in as the ``names`` parameter (:issue:`7160`, :issue:`9424`)

doc/source/whatsnew/v0.20.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ fixed-width text files and :func:`read_excel` for parsing Excel files, now accep
119119
.. ipython:: python
120120
:suppress:
121121
122-
from pandas.compat import StringIO
122+
from io import StringIO
123123
124124
.. ipython:: python
125125

doc/source/whatsnew/v0.21.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ be strings.
194194
.. ipython:: python
195195
:suppress:
196196
197-
from pandas.compat import StringIO
197+
from io import StringIO
198198
199199
.. ipython:: python
200200

doc/source/whatsnew/v0.24.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ missing indicator, ``np.nan``. (:issue:`20377`)
567567
.. ipython:: python
568568
:suppress:
569569
570-
from pandas.compat import StringIO
570+
from pandas.io import StringIO
571571
572572
*Previous Behavior*:
573573

0 commit comments

Comments
 (0)