Le lundi 2 avril 2018 16:57:27 UTC+2, HG a écrit : > I tried networkx, it works fine with python2 but I have > a problem with edges in sagemath ? > > edgelist.head(10) > TypeError: cannot do slice indexing on <class > 'pandas.core.indexes.range.RangeIndex'> with these indexers > [10] of <type 'sage.rings.integer.Integer'> > Is there a way getting it working ?
In Sage, you can try: edgelist.head(10r) instead of edgelist.head(10) where the r in 10r stands for "raw" and avoids the Python integer 10 to be preparsed into a Sage integer. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at https://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.