Re: How can I get/save Pandas DataFrame help content?
Robert wrote: > Hi, > > When I use Enthought/Canopy, help(DataFrame) has so much content that it > exceeds the display buffer, i.e. its head is cut off as I go up to see it. > I would like to know whether there is a way similar to Linux redirection > to save the help DataFrame content to a file? > > I have search on-line Pandas DataFrame web page. Surprisingly, it has much > less content than help(DataFrame) command. > > If there is no way to save the content to a file, do you know where I can > get the full help DataFrame content on a web page? On the commandline start a webserver with python -m pydoc -p 8000 and then point your browser to http://localhost:8000/pandas.core.frame.html#DataFrame -- https://mail.python.org/mailman/listinfo/python-list
Re: How can I get/save Pandas DataFrame help content?
On 2015-12-17 04:09, Steven D'Aprano wrote: On Thursday 17 December 2015 13:48, Robert wrote: Hi, When I use Enthought/Canopy, help(DataFrame) has so much content that it exceeds the display buffer, i.e. its head is cut off as I go up to see it. Step 1: report this as a bug to Enthought and/or the Python bug tracker. help(DataFrame) should automatically choose a pager such as `less` on Linux or equivalent (`more` I think?) on Windows. I suspect that he is using the embedded IPython console in the Canopy IDE, so it's more of an issue that help() knows that it's not in a true terminal so it doesn't page. If he had been using python at the terminal, help() would have indeed used the appropriate terminal pager. Robert, in the IPython console, you can also use a special syntax to get the content. The IPython console widget does know how to page this: In [1]: pandas.DataFrame? http://ipython.readthedocs.org/en/stable/interactive/reference.html#dynamic-object-information -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco -- https://mail.python.org/mailman/listinfo/python-list
Re: How can I get/save Pandas DataFrame help content?
On Thu, Dec 17, 2015 at 1:48 PM, Robertwrote: > Hi, > > When I use Enthought/Canopy, help(DataFrame) has so much content that it > exceeds the display buffer, i.e. its head is cut off as I go up to see it. > I would like to know whether there is a way similar to Linux redirection to > save the help DataFrame content to a file? If you use command-line Python (by just running 'python' or 'python3' in your shell), you should be able to use help() with a More pager. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
Re: How can I get/save Pandas DataFrame help content?
On Thursday 17 December 2015 13:48, Robert wrote: > Hi, > > When I use Enthought/Canopy, help(DataFrame) has so much content that it > exceeds the display buffer, i.e. its head is cut off as I go up to see it. Step 1: report this as a bug to Enthought and/or the Python bug tracker. help(DataFrame) should automatically choose a pager such as `less` on Linux or equivalent (`more` I think?) on Windows. Step 2: in the meantime, while you wait for Enthought to fix this, you can try any of these: (a) open the regular Python interactive interpreter (do you need help with that?); once you have the >>> prompt, import the module that DataFrame comes from, then run help: import whatever help(whatever.DataFrame) The regular interactive interpreter ought to automatically pick a pager. If it doesn't, that's a bug. (b) At the shell prompt (most likely a $ or # prompt) run: pydoc whatever.DataFrame if necessarily piping it to the pager or file of your choice using your shell's normal redirection syntax, e.g.: pydoc whatever.DataFrame | less (Remember, this is at the shell $ prompt, not the Python >>> prompt.) (c) If your OS can't find "pydoc", try this instead: python -m pydoc whatever.DataFrame -- Steve -- https://mail.python.org/mailman/listinfo/python-list
Re: How can I get/save Pandas DataFrame help content?
On Wednesday, December 16, 2015 at 9:56:23 PM UTC-5, Chris Angelico wrote: > On Thu, Dec 17, 2015 at 1:48 PM, Robert wrote: > > Hi, > > > > When I use Enthought/Canopy, help(DataFrame) has so much content that it > > exceeds the display buffer, i.e. its head is cut off as I go up to see it. > > I would like to know whether there is a way similar to Linux redirection to > > save the help DataFrame content to a file? > > If you use command-line Python (by just running 'python' or 'python3' > in your shell), you should be able to use help() with a More pager. > > ChrisA Thanks for this useful idea. I have tried with: help(DataFrame) | more NameError Traceback (most recent call last) in () > 1 help(DataFrame) | more NameError: name 'more' is not defined It is possible I misunderstand your method. Could you give me a little more description on it? -- https://mail.python.org/mailman/listinfo/python-list
Re: How can I get/save Pandas DataFrame help content?
On Thu, Dec 17, 2015 at 2:20 PM, Robertwrote: > On Wednesday, December 16, 2015 at 9:56:23 PM UTC-5, Chris Angelico wrote: >> On Thu, Dec 17, 2015 at 1:48 PM, Robert wrote: >> > Hi, >> > >> > When I use Enthought/Canopy, help(DataFrame) has so much content that it >> > exceeds the display buffer, i.e. its head is cut off as I go up to see it. >> > I would like to know whether there is a way similar to Linux redirection to >> > save the help DataFrame content to a file? >> >> If you use command-line Python (by just running 'python' or 'python3' >> in your shell), you should be able to use help() with a More pager. >> >> ChrisA > > Thanks for this useful idea. > I have tried with: > > help(DataFrame) | more > NameError Traceback (most recent call last) > in () > > 1 help(DataFrame) | more > > NameError: name 'more' is not defined > > It is possible I misunderstand your method. Could you give me a little more > description on it? Sorry for the confusion. You don't need to explicitly request the pager; the default interpreter configuration should include that. ChrisA -- https://mail.python.org/mailman/listinfo/python-list
How can I get/save Pandas DataFrame help content?
Hi, When I use Enthought/Canopy, help(DataFrame) has so much content that it exceeds the display buffer, i.e. its head is cut off as I go up to see it. I would like to know whether there is a way similar to Linux redirection to save the help DataFrame content to a file? I have search on-line Pandas DataFrame web page. Surprisingly, it has much less content than help(DataFrame) command. If there is no way to save the content to a file, do you know where I can get the full help DataFrame content on a web page? Thanks, -- https://mail.python.org/mailman/listinfo/python-list