Binary .dat file Plotting Column Array values
Question: I have imported an array into my IPython notebook using the following method:

    
    
    SDSS_local_AGN = np.fromfile('/Users/iMacHome/Downloads/SDSS_local_AGN_Spectra.dat', dtype=float)
    

The array is of the form:

    
    
     SPECOBJID_1         RA          DEC           SUBCLASS ...
     299528159882143744  146.29988   -0.12001413   AGN      ...
     299532283050747904  146.32957   -0.30622363   AGN      ...
    

Essentially each column has a header, and I now need to plot certain values.

As an example, I want to plot RA against DEC...how would I go about doing
this?

Perhaps:

    
    
    axScatter.plot(SDSS_local_AGN[RA], SDSS_local_AGN[DEC])
    


Answer: ## Answer is mistaken, see comments

If you want to access them via name, you should use pandas instead of numpy.
In numpy, you need to lookup by index:

    
    
    plt.scatter(SDSS_local_AGN[1], SDSS_local_AGN[2])
    

But in pandas, it would be as simple as:

    
    
    df = read_csv('myfile')
    df.plot(kind='scatter', x='RA', y='DEC')
    

<http://pandas.pydata.org/pandas-
docs/version/0.15.0/visualization.html#scatter-plot>

`SDSS_local_AGN['RA']` is a valid operation in pandas, but not in `numpy`.

PS, since you are working in a Notebook, pandas DataFrames will nicely render
as HTML tables, making them much more readable.

