Skip to content

Commit

Permalink
DOC: import StringIO from io instead of pandas.compat (#25997)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche authored and jreback committed Apr 5, 2019
1 parent fc5f292 commit fa9c7de
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doc/source/user_guide/cookbook.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ Option 1: pass rows explicitly to skip rows

.. ipython:: python
from pandas.compat import StringIO
from io import StringIO
pd.read_csv(StringIO(data), sep=';', skiprows=[11, 12],
index_col=0, parse_dates=True, header=10)
Expand Down
2 changes: 1 addition & 1 deletion doc/source/user_guide/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ usecols : list-like or callable, default ``None``

.. ipython:: python
from pandas.compat import StringIO, BytesIO
from io import StringIO, BytesIO
data = ('col1,col2,col3\n'
'a,b,1\n'
'a,b,2\n'
Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.19.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ default of the index) in a DataFrame.
.. ipython:: python
:suppress:
from pandas.compat import StringIO
from io import StringIO
:ref:`Duplicate column names <io.dupe_names>` are now supported in :func:`read_csv` whether
they are in the file or passed in as the ``names`` parameter (:issue:`7160`, :issue:`9424`)
Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.20.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ fixed-width text files and :func:`read_excel` for parsing Excel files, now accep
.. ipython:: python
:suppress:
from pandas.compat import StringIO
from io import StringIO
.. ipython:: python
Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.21.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ be strings.
.. ipython:: python
:suppress:
from pandas.compat import StringIO
from io import StringIO
.. ipython:: python
Expand Down
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.24.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ missing indicator, ``np.nan``. (:issue:`20377`)
.. ipython:: python
:suppress:
from pandas.compat import StringIO
from pandas.io import StringIO
*Previous Behavior*:

Expand Down

0 comments on commit fa9c7de

Please sign in to comment.