Question: Right here we go I might have this completely wrong.

I'm working in Wordpress.

On a page I'm creating a html select menu (Main menu) with options that relate to each page in the site. This menu is displayed on the page.

I'm also creating select menus with options for each page (Page Menus), these menu's aren't displayed but stored in a php variable.

The options in the Main Menu relate to these php variable which are the Page Menus 

Now when an option is selected in Main menu I would like to load the related Page Menu but I don't want to relaod the page.

Can I store the HTML code for the Page Menus then load them with AJAX when the related option is selected in the Main Menu.

Hope this makes sense and someone can help.

Answer: 
Try without using usecols, there is [a known bug which means this won't work with a separator other than `,`](https://github.com/pydata/pandas/issues/2733).

You can read these directly:

```
In [11]: pd.read_csv('foo.csv', sep='\s*\|\s*', index_col=[0])
Out[11]: 
        head1  head2  Unnamed: 3
index1  data1  data2         NaN

In [12]: pd.read_csv('foo.csv', sep='\s*\|\s*', index_col=[0]).dropna(axis=1)
Out[12]: 
        head1  head2
index1  data1  data2

```

*Note: I've had to use `\s*|\s*` as the sep rather than just `|` so as not to include spaces.*
If I understand this question correctly, I think you may have to read in the entire csv file as a dataframe and then select the columns that you want.... Something like this:

```
import pandas as pd
df = pd.read_csv(yourdata, index_col=0).loc[:,'header1']

```