(a) Create a binary variable, mpg01, that contains a 1 if mpg contains a value above its median, and a 0 if mpg contains a value below its median. You can compute the median using the median() method of the data frame. 

Note you may find it helpful to add a column mpg01 to the data frame by assignment. Assuming you have stored the data frame as Auto, this can be done as follows:
`Auto['mpg01'] = mpg01`

For the competition to work:

Create a new column ID which uses ['year', 'name','weight'] as the primary key.  Set the primary key/ID column as the index:

```
auto_df['ID'] = auto_df[primary_key_columns].astype(str).agg('_'.join, axis=1)
auto_df = auto_df.set_index(['ID'])
```

You can then export the index (`ID` column) and the `mpg01` column.
```
auto_df[['mpg01']].to_csv('solution.csv',index=True)
```

The output (csv file) should look like this:

head output.csv
```
ID,mpg01
70_chevrolet chevelle malibu_3504,False
70_buick skylark 320_3693,False
70_plymouth satellite_3436,False
70_amc rebel sst_3433,False
70_ford torino_3449,False
70_ford galaxie 500_4341,False
70_chevrolet impala_4354,False
70_plymouth fury iii_4312,False
70_pontiac catalina_4425,False
```
