Where can I find documentation for data[:,9]

Discussion in 'Python' started by Cal Who, Mar 11, 2010.

  1. Cal Who

    Cal Who Guest

    data = readdata( 'data/input.dat', delimiter = ',' )

    input = data[:, :9]#nine data columns



    Where can I find documentation for the

    data[:,9]

    in the code above.

    Been looking and found many examples but would like to know the definition.

    I need to skip the first column and then read 9



    I would also like to print the data in ihe variable "input"



    Thanks
    Cal Who, Mar 11, 2010
    #1
    1. Advertising

  2. Cal Who

    Robert Kern Guest

    On 2010-03-11 13:01 PM, Cal Who wrote:
    > data = readdata( 'data/input.dat', delimiter = ',' )
    >
    > input = data[:, :9]#nine data columns
    >
    >
    >
    > Where can I find documentation for the
    >
    > data[:,9]
    >
    > in the code above.
    >
    > Been looking and found many examples but would like to know the definition.


    When asking questions like this, it helps *a lot* to provide a complete example,
    not just a snippet. If I weren't already intimately familiar with the library
    you are using, I would have no idea how to help you.

    However, I do know that input object is a numpy array, and the syntax you are
    asking about is multidimensional slicing.

    http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html

    > I need to skip the first column and then read 9


    data[:, 1:10]

    > I would also like to print the data in ihe variable "input"


    print input

    --
    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
    Robert Kern, Mar 11, 2010
    #2
    1. Advertising

  3. Cal Who

    Cal Who Guest

    "Robert Kern" <> wrote in message
    news:...
    > On 2010-03-11 13:01 PM, Cal Who wrote:
    >> data = readdata( 'data/input.dat', delimiter = ',' )
    >>
    >> input = data[:, :9]#nine data columns
    >>
    >>
    >>
    >> Where can I find documentation for the
    >>
    >> data[:,9]
    >>
    >> in the code above.
    >>
    >> Been looking and found many examples but would like to know the
    >> definition.

    >
    > When asking questions like this, it helps *a lot* to provide a complete
    > example, not just a snippet. If I weren't already intimately familiar with
    > the library you are using, I would have no idea how to help you.
    >
    > However, I do know that input object is a numpy array, and the syntax you
    > are asking about is multidimensional slicing.
    >
    > http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html
    >
    >> I need to skip the first column and then read 9

    >
    > data[:, 1:10]
    >
    >> I would also like to print the data in ihe variable "input"

    >
    > print input
    >
    > --
    > 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
    >

    Thanks, that helped a lot.

    I'm having trouble knowing what to search for to find documenatation. For
    example, is print a Python command, a numpy command or a java command?

    I like to read the documentation even if the command is working for me.


    Thanks again
    Cal Who, Mar 11, 2010
    #3
  4. On 03/11/10 22:08, Cal Who wrote:
    <cut>
    > Thanks, that helped a lot.
    >
    > I'm having trouble knowing what to search for to find documenatation. For
    > example, is print a Python command, a numpy command or a java command?
    >
    > I like to read the documentation even if the command is working for me.
    >
    >
    > Thanks again
    >
    >

    Probably for you the right way would be to familiarize yourself with the
    namespace concept of Python, this makes it easier to identify whether
    something is built-in, a standard module or an external module.
    Which makes it much easier to feed google the right clues.

    --
    mph
    Martin P. Hellwig, Mar 11, 2010
    #4
  5. Cal Who

    Cal Who Guest

    "Martin P. Hellwig" <> wrote in message
    news:hnbq8q$vgm$-september.org...
    > On 03/11/10 22:08, Cal Who wrote:
    > <cut>
    >> Thanks, that helped a lot.
    >>
    >> I'm having trouble knowing what to search for to find documenatation. For
    >> example, is print a Python command, a numpy command or a java command?
    >>
    >> I like to read the documentation even if the command is working for me.
    >>
    >>
    >> Thanks again
    >>
    >>

    > Probably for you the right way would be to familiarize yourself with the
    > namespace concept of Python, this makes it easier to identify whether
    > something is built-in, a standard module or an external module.
    > Which makes it much easier to feed google the right clues.
    >
    > --
    > mph


    Thanks a lot, I'll look that up now.
    Cal Who, Mar 11, 2010
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cameron Laird
    Replies:
    1
    Views:
    639
    Josiah Carlson
    Apr 3, 2004
  2. Kenneth McDonald
    Replies:
    2
    Views:
    711
  3. John Pote
    Replies:
    4
    Views:
    313
    John Pote
    Mar 4, 2006
  4. Replies:
    1
    Views:
    1,195
    Andy Dingley
    Sep 16, 2006
  5. Replies:
    1
    Views:
    101
    James Britt
    Nov 5, 2004
Loading...

Share This Page