title: Assign a list to class instances
body: <p>I am wanting to take a list of various variable names, and assign all of them as instance variables to a class.</p>
  
  <p>Furthermore I would also like to assign attributes to these instance variables from a database.</p>
  
  <p>For Example: I have a dataframe with headers, ('col1', 'col2', 'col3', 'col4'). each row should be a class instance, and each column should be an instance variable of that class. Then the values in each row, should be assigned to each instance variables as attributes for every class instance.</p>
  
  <p>how can i accomplish this?</p>
  
  <p>here is a list of variables:</p>
  
  <pre><code>Index(['Id', 'MSSubClass', 'MSZoning', 'LotFrontage', 'LotArea', 'Street',
         'Alley', 'LotShape', 'LandContour', 'Utilities', 'LotConfig',
         'LandSlope', 'Neighborhood', 'Condition1', 'Condition2', 'BldgType',
         'HouseStyle', 'OverallQual', 'OverallCond', 'YearBuilt', 'YearRemodAdd',
         'RoofStyle', 'RoofMatl', 'Exterior1st', 'Exterior2nd', 'MasVnrType',
         'MasVnrArea', 'ExterQual', 'ExterCond', 'Foundation', 'BsmtQual',
         'BsmtCond', 'BsmtExposure', 'BsmtFinType1', 'BsmtFinSF1',
         'BsmtFinType2', 'BsmtFinSF2', 'BsmtUnfSF', 'TotalBsmtSF', 'Heating',
         'HeatingQC', 'CentralAir', 'Electrical', '1stFlrSF', '2ndFlrSF',
         'LowQualFinSF', 'GrLivArea', 'BsmtFullBath', 'BsmtHalfBath', 'FullBath',
         'HalfBath', 'BedroomAbvGr', 'KitchenAbvGr', 'KitchenQual',
         'TotRmsAbvGrd', 'Functional', 'Fireplaces', 'FireplaceQu', 'GarageType',
         'GarageYrBlt', 'GarageFinish', 'GarageCars', 'GarageArea', 'GarageQual',
         'GarageCond', 'PavedDrive', 'WoodDeckSF', 'OpenPorchSF',
         'EnclosedPorch', '3SsnPorch', 'ScreenPorch', 'PoolArea', 'PoolQC',
         'Fence', 'MiscFeature', 'MiscVal', 'MoSold', 'YrSold', 'SaleType',
         'SaleCondition', 'SalePrice'],
        dtype='object')
  </code></pre>
  
  <p>Here is an example dataframe:</p>
  
  <pre><code>import pandas as pd
  from numpy import nan
  d = {'name' : pd.Series(['steve', 'jeff', 'bob'], index=['1', '2', '3']),
         ....:      'salary' : pd.Series([34, 85, 213], index=['1', '2', '3']), 'male' : pd.Series([1, nan, 0], index=['1', '2', '3']), 'score' : pd.Series([1.46, 0.8, 3.], index=['1', '2', '3'])}
  
  df = pd.DataFrame(d)
  </code></pre>