Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Where can I find documentation for data[:,9]

Reply
Thread Tools

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

 
 
Cal Who
Guest
Posts: n/a
 
      03-11-2010
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


 
Reply With Quote
 
 
 
 
Robert Kern
Guest
Posts: n/a
 
      03-11-2010
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/refe....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

 
Reply With Quote
 
 
 
 
Cal Who
Guest
Posts: n/a
 
      03-11-2010

"Robert Kern" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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/refe....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


 
Reply With Quote
 
Martin P. Hellwig
Guest
Posts: n/a
 
      03-11-2010
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
 
Reply With Quote
 
Cal Who
Guest
Posts: n/a
 
      03-11-2010

"Martin P. Hellwig" <(E-Mail Removed)> wrote in message
news:hnbq8q$vgm$(E-Mail Removed)-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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
converting XSD documentation to HTML documentation kev.sully@gmail.com XML 1 09-16-2006 12:09 PM
sockets, where can I find documentation? John Pote Python 4 03-04-2006 12:09 AM
Where can I find the reference documentation for libxml? andrew.stuart@xse.com.au Ruby 1 11-05-2004 01:56 PM
Python documentation: How about structured documentation? Looking for comments/suggestions Kenneth McDonald Python 2 05-06-2004 04:11 AM
Principles of documentation (was: Python Documentation Blows!) Cameron Laird Python 1 04-03-2004 06:54 PM



Advertisments