diff --git a/doc/source/categorical.rst b/doc/source/categorical.rst index 6ce93326f0e16..7fe04af716cec 100644 --- a/doc/source/categorical.rst +++ b/doc/source/categorical.rst @@ -386,9 +386,9 @@ categories or a categorical with any list-like object, will raise a TypeError. .. ipython:: python - cat = Series(Categorical([1,2,3], categories=[3,2,1])) - cat_base = Series(Categorical([2,2,2], categories=[3,2,1])) - cat_base2 = Series(Categorical([2,2,2])) + cat = Series([1,2,3]).astype("category", categories=[3,2,1], ordered=True) + cat_base = Series([2,2,2]).astype("category", categories=[3,2,1], ordered=True) + cat_base2 = Series([2,2,2]).astype("category", ordered=True) cat cat_base diff --git a/doc/source/io.rst b/doc/source/io.rst index d49e88c953b27..2b13131c1d576 100644 --- a/doc/source/io.rst +++ b/doc/source/io.rst @@ -1098,7 +1098,7 @@ class of the csv module. For this, you have to specify ``sep=None``. .. ipython:: python print(open('tmp2.sv').read()) - pd.read_csv('tmp2.sv', sep=None) + pd.read_csv('tmp2.sv', sep=None, engine='python') .. _io.chunking: