Skip to content

Commit 2100a3a

Browse files
DOC: fix py3 compat (change lost in FAQ-gotchas merge)
1 parent 3f7d2db commit 2100a3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/source/advanced.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ normal Python ``list``. Monotonicity of an index can be tested with the ``is_mon
880880
881881
.. ipython:: python
882882
883-
df = pd.DataFrame(index=[2,3,3,4,5], columns=['data'], data=range(5))
883+
df = pd.DataFrame(index=[2,3,3,4,5], columns=['data'], data=list(range(5)))
884884
df.index.is_monotonic_increasing
885885
886886
# no rows 0 or 1, but still returns rows 2, 3 (both of them), and 4:
@@ -894,7 +894,7 @@ On the other hand, if the index is not monotonic, then both slice bounds must be
894894
895895
.. ipython:: python
896896
897-
df = pd.DataFrame(index=[2,3,1,4,3,5], columns=['data'], data=range(6))
897+
df = pd.DataFrame(index=[2,3,1,4,3,5], columns=['data'], data=list(range(6)))
898898
df.index.is_monotonic_increasing
899899
900900
# OK because 2 and 4 are in the index

0 commit comments

Comments
 (0)