diff --git a/doc/source/user_guide/io/excel.rst b/doc/source/user_guide/io/excel.rst index 41ff0e7477235..26e9c16ce27fe 100644 --- a/doc/source/user_guide/io/excel.rst +++ b/doc/source/user_guide/io/excel.rst @@ -221,6 +221,7 @@ should be passed to ``index_col`` and ``header``: .. ipython:: python :suppress: + import os os.remove("path_to_file.xlsx") Missing values in columns specified in ``index_col`` will be forward filled to diff --git a/doc/source/user_guide/io/feather.rst b/doc/source/user_guide/io/feather.rst index 713660e7e0260..3a3e34eabe4f9 100644 --- a/doc/source/user_guide/io/feather.rst +++ b/doc/source/user_guide/io/feather.rst @@ -64,4 +64,5 @@ Read from a feather file. .. ipython:: python :suppress: + import os os.remove("example.feather") diff --git a/doc/source/user_guide/io/hdf5.rst b/doc/source/user_guide/io/hdf5.rst index 55457339f0179..79aec64026c0f 100644 --- a/doc/source/user_guide/io/hdf5.rst +++ b/doc/source/user_guide/io/hdf5.rst @@ -21,6 +21,7 @@ for some advanced strategies :suppress: :okexcept: + import os os.remove("store.h5") .. ipython:: python diff --git a/doc/source/user_guide/io/html.rst b/doc/source/user_guide/io/html.rst index 879c2da281c92..efc3958b00e94 100644 --- a/doc/source/user_guide/io/html.rst +++ b/doc/source/user_guide/io/html.rst @@ -120,6 +120,7 @@ as a string: .. ipython:: python :suppress: + import os os.remove("tmp.html") You can even pass in an instance of ``StringIO`` if you so desire: diff --git a/doc/source/user_guide/io/json.rst b/doc/source/user_guide/io/json.rst index 2861176cd80fb..c745c59f684da 100644 --- a/doc/source/user_guide/io/json.rst +++ b/doc/source/user_guide/io/json.rst @@ -604,6 +604,7 @@ indicate missing values and the subsequent read cannot distinguish the intent. .. ipython:: python :suppress: + import os os.remove("test.json") When using ``orient='table'`` along with user-defined ``ExtensionArray``, diff --git a/doc/source/user_guide/io/orc.rst b/doc/source/user_guide/io/orc.rst index fc1f2e671b011..d49c55efa347a 100644 --- a/doc/source/user_guide/io/orc.rst +++ b/doc/source/user_guide/io/orc.rst @@ -59,4 +59,5 @@ Read only certain columns of an orc file. .. ipython:: python :suppress: + import os os.remove("example_pa.orc") diff --git a/doc/source/user_guide/io/parquet.rst b/doc/source/user_guide/io/parquet.rst index ada07471c9aac..efe10bfa18bf3 100644 --- a/doc/source/user_guide/io/parquet.rst +++ b/doc/source/user_guide/io/parquet.rst @@ -105,8 +105,9 @@ Read only certain columns of a parquet file. .. ipython:: python - :suppress: + :okexcept: + import os os.remove("example_pa.parquet") os.remove("example_fp.parquet") @@ -145,7 +146,7 @@ Passing ``index=True`` will *always* write the index, even if that's not the underlying engine's default behavior. .. ipython:: python - :suppress: + :okexcept: os.remove("test.parquet") diff --git a/doc/source/user_guide/io/pickling.rst b/doc/source/user_guide/io/pickling.rst index 8da5e1f96a184..38c6ec1f60e89 100644 --- a/doc/source/user_guide/io/pickling.rst +++ b/doc/source/user_guide/io/pickling.rst @@ -23,6 +23,7 @@ any pickled pandas object (or any other pickled object) from file: .. ipython:: python :suppress: + import os os.remove("foo.pkl") .. warning:: diff --git a/doc/source/user_guide/io/stata.rst b/doc/source/user_guide/io/stata.rst index 89f930525d3a8..d76800eb1ee8c 100644 --- a/doc/source/user_guide/io/stata.rst +++ b/doc/source/user_guide/io/stata.rst @@ -124,6 +124,7 @@ values will have ``object`` data type. .. ipython:: python :suppress: + import os os.remove("stata.dta") .. _io.stata-categorical: diff --git a/doc/source/user_guide/io/xml.rst b/doc/source/user_guide/io/xml.rst index aa619eeefe149..67b423a0ec831 100644 --- a/doc/source/user_guide/io/xml.rst +++ b/doc/source/user_guide/io/xml.rst @@ -133,6 +133,7 @@ Specify only elements or only attributes to parse: .. ipython:: python :suppress: + import os os.remove("books.xml") XML documents can have namespaces with prefixes and default namespaces without