human
I am working on the file "3-data-checks.ipynb".
The first task is:
By having things YAML formatted, you preserve human-readability and computer-readability simultaneously. 
Providing metadata should be something already done when doing analytics.
YAML-format is a strong suggestion, but YAML schema will depend on use case.
Let's now switch roles, and pretend that we're on side of the "analyst" and are no longer the "data provider". 
How would you check that the columns match the spec? Basically, check that every element in df.columns is present inside the metadata['columns'] list.
Exercise
Inside test_datafuncs.py, write a utility function, check_schema(df, meta_columns) that tests whether every column in a DataFrame is present in some metadata spec file. It should accept two arguments:

df: a pandas.DataFrame
meta_columns: A list of columns from the metadata spec.

```python
def check_schema(df, meta_columns):
    for col in df.columns:
        assert col in meta_columns, f'"{col}" not in metadata column spec'
```
In your test file, outside the function definition, write another test function, test_budget_schemas(), explicitly runs a test for just the budget data.
```python
def test_budget_schemas():
    columns = read_metadata('data/metadata_budget.yml')['columns']
    df = pd.read_csv('data/boston_budget.csv')
check_schema(df, columns)

```
Now, run the test. Do you get the following error? Can you spot the error?
```bash
    def check_schema(df, meta_columns):
        for col in df.columns:

      assert col in meta_columns, f'"{col}" not in metadata column spec'

E           AssertionError: " Amount" not in metadata column spec
E           assert ' Amount' in ['Fiscal Year', 'Service (Cabinet)', 'Department', 'Program #', 'Program', 'Expense Type', ...]

test_datafuncs_soln.py:63: AssertionError
=================================== 1 failed, 7 passed in 0.91 seconds ===================================
```
If there is even a slight mis-spelling, this kind of check will help you pinpoint where that is. Note how the "Amount" column is spelled with an extra space. 
At this...
Can you write Python code for it?

What is a the Python code you requested?
assistant
#Here is the Python code you requested.

import pandas as pd
import seaborn as sns
sns.set_style('white')
%matplotlib inline

df = pd.read_csv('data/boston_ei-corrupt.csv')
df.head()