Skip to content

Commit 6b8d849

Browse files
committed
DOC: change lzip,lrange in 10min.rst to list(zip(..)) and list(range(..))
1 parent 23fe024 commit 6b8d849

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

doc/source/10min.rst

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import pandas as pd
1414
np.set_printoptions(precision=4, suppress=True)
1515
options.display.mpl_style='default'
16-
from pandas.compat import lrange, lzip
1716
1817
#### portions of this were borrowed from the
1918
#### Pandas cheatsheet
@@ -63,7 +62,7 @@ Creating a ``DataFrame`` by passing a dict of objects that can be converted to s
6362
6463
df2 = pd.DataFrame({ 'A' : 1.,
6564
'B' : pd.Timestamp('20130102'),
66-
'C' : pd.Series(1,index=lrange(4),dtype='float32'),
65+
'C' : pd.Series(1,index=list(range(4)),dtype='float32'),
6766
'D' : np.array([3] * 4,dtype='int32'),
6867
'E' : 'foo' })
6968
df2
@@ -510,10 +509,10 @@ Stack
510509

511510
.. ipython:: python
512511
513-
tuples = lzip(*[['bar', 'bar', 'baz', 'baz',
514-
'foo', 'foo', 'qux', 'qux'],
515-
['one', 'two', 'one', 'two',
516-
'one', 'two', 'one', 'two']])
512+
tuples = list(zip(*[['bar', 'bar', 'baz', 'baz',
513+
'foo', 'foo', 'qux', 'qux'],
514+
['one', 'two', 'one', 'two',
515+
'one', 'two', 'one', 'two']]))
517516
index = pd.MultiIndex.from_tuples(tuples, names=['first', 'second'])
518517
df = pd.DataFrame(np.random.randn(8, 2), index=index, columns=['A', 'B'])
519518
df2 = df[:4]
@@ -619,6 +618,7 @@ Plotting
619618
620619
import matplotlib.pyplot as plt
621620
plt.close('all')
621+
from pandas import options
622622
options.display.mpl_style='default'
623623
624624
.. ipython:: python

0 commit comments

Comments
 (0)