How can I get/save Pandas DataFrame help content?

Chris Angelico rosuav at gmail.com
Wed Dec 16 22:30:37 EST 2015


On Thu, Dec 17, 2015 at 2:20 PM, Robert <rxjwg98 at gmail.com> wrote:
> 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 <com> 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)
> <ipython-input-52-826956076b70> in <module>()
> ----> 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



More information about the Python-list mailing list