Note
Go to the end to download the full example code or to run this example in your browser via JupyterLite or Binder.
Encoding: from a dataframe to a numerical matrix for machine learning#
This example shows how to transform a rich dataframe with columns of various types into a numerical matrix on which machine-learning algorithms can be applied. We study the case of predicting wages using the employee salaries dataset.
Easy learning on a dataframe#
Let’s first retrieve the dataset, using one of the downloaders from the
skrub.datasets module. As all the downloaders,
fetch_employee_salaries() returns a dataset with a path
field pointing to the dataframe file, which contains both the features and the
target. We load the dataframe from the path using pandas.
X is a dataframe which contains the
features (aka design matrix, explanatory variables, independent variables).
y is a column (pandas Series) which contains the target (aka dependent, response
variable) that we want to learn to predict from X. In this case y is the
annual salary, found in column “current_annual_salary”.
import pandas as pd
from skrub.datasets import fetch_employee_salaries
file_path = fetch_employee_salaries().path
employees = pd.read_csv(file_path)
X = employees.drop(columns="current_annual_salary")
y = employees["current_annual_salary"]
Most machine-learning algorithms work with arrays of numbers. The
challenge here is that the employees dataframe is a heterogeneous
set of columns: some are numerical ('year_first_hired'), some dates
('date_first_hired'), some have a few categorical entries
('gender'), some many ('employee_position_title'). Therefore
our table needs to be “vectorized”: processed to extract numeric
features.
skrub provides an easy way to build a simple but reliable
machine-learning model which includes this step, working well on most
tabular data.
from sklearn.model_selection import cross_validate
from skrub import tabular_pipeline
model = tabular_pipeline("regressor")
results = cross_validate(model, X, y)
results["test_score"]
array([0.90842776, 0.87932023, 0.91346596, 0.92178993, 0.9210775 ])
The estimator returned by tabular_pipeline combines 2 steps:
a
TableVectorizerto preprocess the dataframe and vectorize the featuresa supervised learner (by default a
HistGradientBoostingRegressor)
Pipeline(steps=[('tablevectorizer',
TableVectorizer(low_cardinality=ToCategorical())),
('histgradientboostingregressor',
HistGradientBoostingRegressor())])In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
Parameters
Parameters
Parameters
Parameters
Parameters
Parameters
Parameters
In the rest of this example, we focus on the first step and explore the
capabilities of skrub’s TableVectorizer.
More details on encoding tabular data#
from skrub import TableVectorizer
vectorizer = TableVectorizer()
vectorized_X = vectorizer.fit_transform(X)
vectorized_X
| gender_F | gender_M | gender_nan | department_BOA | department_BOE | department_CAT | department_CCL | department_CEC | department_CEX | department_COR | department_CUS | department_DEP | department_DGS | department_DHS | department_DLC | department_DOT | department_DPS | department_DTS | department_ECM | department_FIN | department_FRS | department_HCA | department_HHS | department_HRC | department_IGR | department_LIB | department_MPB | department_NDA | department_OAG | department_OCP | department_OHR | department_OIG | department_OLO | department_OMB | department_PIO | department_POL | department_PRO | department_REC | department_SHF | department_ZAH | department_name_Board of Appeals Department | department_name_Board of Elections | department_name_Community Engagement Cluster | department_name_Community Use of Public Facilities | department_name_Correction and Rehabilitation | department_name_County Attorney's Office | department_name_County Council | department_name_Department of Environmental Protection | department_name_Department of Finance | department_name_Department of General Services | department_name_Department of Health and Human Services | department_name_Department of Housing and Community Affairs | department_name_Department of Liquor Control | department_name_Department of Permitting Services | department_name_Department of Police | department_name_Department of Public Libraries | department_name_Department of Recreation | department_name_Department of Technology Services | department_name_Department of Transportation | department_name_Ethics Commission | department_name_Fire and Rescue Services | department_name_Merit System Protection Board Department | department_name_Non-Departmental Account | department_name_Office of Agriculture | department_name_Office of Consumer Protection | department_name_Office of Emergency Management and Homeland Security | department_name_Office of Human Resources | department_name_Office of Human Rights | department_name_Office of Intergovernmental Relations Department | department_name_Office of Legislative Oversight | department_name_Office of Management and Budget | department_name_Office of Procurement | department_name_Office of Public Information | department_name_Office of Zoning and Administrative Hearings | department_name_Office of the Inspector General | department_name_Offices of the County Executive | department_name_Sheriff's Office | division_00 | division_01 | division_02 | division_03 | division_04 | division_05 | division_06 | division_07 | division_08 | division_09 | division_10 | division_11 | division_12 | division_13 | division_14 | division_15 | division_16 | division_17 | division_18 | division_19 | division_20 | division_21 | division_22 | division_23 | division_24 | division_25 | division_26 | division_27 | division_28 | division_29 | assignment_category_Parttime-Regular | employee_position_title_00 | employee_position_title_01 | employee_position_title_02 | employee_position_title_03 | employee_position_title_04 | employee_position_title_05 | employee_position_title_06 | employee_position_title_07 | employee_position_title_08 | employee_position_title_09 | employee_position_title_10 | employee_position_title_11 | employee_position_title_12 | employee_position_title_13 | employee_position_title_14 | employee_position_title_15 | employee_position_title_16 | employee_position_title_17 | employee_position_title_18 | employee_position_title_19 | employee_position_title_20 | employee_position_title_21 | employee_position_title_22 | employee_position_title_23 | employee_position_title_24 | employee_position_title_25 | employee_position_title_26 | employee_position_title_27 | employee_position_title_28 | employee_position_title_29 | date_first_hired_year | date_first_hired_month | date_first_hired_day | date_first_hired_total_seconds | year_first_hired | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.218 | 0.353 | -0.0416 | -0.0900 | -0.446 | -0.238 | -0.185 | -0.0513 | -0.229 | -0.0690 | -0.0257 | -0.125 | -0.0818 | 0.0489 | 0.0790 | 0.118 | 0.0215 | -0.232 | -0.197 | 0.126 | -0.357 | 0.0582 | -0.188 | -0.147 | 0.163 | 0.0149 | 0.0364 | 0.00979 | -0.00711 | -0.0145 | 0.00 | 0.398 | -0.146 | 0.180 | -0.0653 | 0.0948 | 0.0932 | 0.782 | 0.305 | -0.285 | -0.127 | -0.119 | -0.416 | -0.0521 | -0.172 | 0.203 | 0.00908 | -0.118 | -0.0229 | 0.0897 | -0.116 | -0.0295 | 0.0976 | -0.0361 | -0.0154 | 0.0201 | -0.0286 | 0.0449 | -0.0975 | -0.0937 | 0.0356 | 1.99e+03 | 9.00 | 22.0 | 5.28e+08 | 1.99e+03 |
| 1 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.163 | 0.232 | -0.0295 | -0.0615 | -0.383 | -0.0161 | -0.0946 | -0.0577 | 0.108 | -0.0467 | 0.0327 | -0.129 | -0.0128 | 0.0293 | -0.102 | -0.0445 | -0.0387 | -0.0541 | -0.274 | 0.253 | 0.150 | -0.115 | -0.00421 | 0.00462 | -0.0390 | 0.00845 | -0.0440 | -0.0887 | 0.115 | -0.0341 | 0.00 | 0.847 | -0.118 | -0.0486 | -0.111 | -0.0529 | -0.0486 | -0.108 | 0.00810 | -0.0236 | -0.0552 | -0.0566 | -0.00862 | 0.0560 | -0.0586 | -0.0214 | -0.00298 | -0.00643 | -0.0784 | -0.148 | -0.0203 | -0.104 | 0.170 | -0.00671 | -0.0695 | -0.0951 | 0.661 | 0.197 | 0.0768 | 0.0737 | 0.101 | 1.99e+03 | 9.00 | 12.0 | 5.90e+08 | 1.99e+03 |
| 2 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.132 | 0.255 | 0.350 | -0.0107 | -0.0790 | -0.404 | -0.152 | -0.0184 | -0.423 | -0.0727 | -0.0265 | -0.0904 | 0.0102 | 0.0805 | -0.0177 | 0.0318 | 0.0660 | -0.277 | -0.140 | -0.00631 | -0.0393 | 0.0815 | -0.0878 | -0.0392 | -0.402 | -0.0232 | -0.0639 | -0.211 | -0.343 | 0.126 | 0.00 | 0.0480 | 0.0161 | 0.00704 | 0.0872 | 0.120 | 0.0590 | 0.213 | -0.235 | 0.375 | 0.732 | -0.460 | 0.0477 | 0.0600 | 0.0295 | 0.176 | 0.0317 | 0.0129 | -0.0176 | -0.0549 | -0.0608 | -0.0868 | 0.0281 | 0.0298 | 0.00623 | -0.00488 | 0.0607 | 0.0344 | -0.0427 | -0.00159 | 0.100 | 1.99e+03 | 11.0 | 19.0 | 6.27e+08 | 1.99e+03 |
| 3 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.0582 | 0.0880 | 0.0638 | 0.000581 | -0.295 | -0.130 | 0.575 | 0.0640 | -0.0902 | 0.0136 | -0.00554 | 0.0260 | 0.0386 | 0.425 | -0.160 | -0.174 | 0.0342 | 0.0244 | -0.00922 | 0.0126 | -0.155 | -0.0487 | 0.173 | 0.0617 | 0.00571 | 0.108 | -0.0723 | 0.0522 | -0.0510 | -0.00113 | 0.00 | 0.0461 | 0.0237 | 0.0694 | 0.0389 | 0.0573 | 0.0490 | 0.131 | 0.0620 | 0.0208 | 0.0182 | 0.0629 | -0.0171 | -0.0608 | -0.00769 | -0.0256 | -0.0199 | 0.116 | 0.0470 | -0.0894 | 0.131 | 0.152 | -0.0126 | 0.0453 | 0.176 | -0.00252 | 0.0744 | -0.235 | -0.310 | 0.611 | 0.0536 | 2.01e+03 | 5.00 | 5.00 | 1.40e+09 | 2.01e+03 |
| 4 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.0146 | 0.0259 | -0.00150 | 0.0268 | -0.0367 | -0.0312 | -0.0198 | 0.0507 | -0.0216 | 0.0109 | -0.000800 | 0.0264 | 0.0218 | 0.104 | -0.0258 | 0.0482 | 0.0327 | -0.0858 | 0.00974 | -0.0717 | 0.0646 | 0.0542 | -0.0924 | -0.0454 | 0.0291 | 0.0683 | -0.0791 | -0.0529 | 0.0313 | -0.0101 | 0.00 | 0.0903 | 0.0242 | 0.0260 | 0.243 | 0.390 | -0.0631 | -0.0142 | -0.146 | -0.0338 | 0.0443 | 0.00451 | -0.0805 | 0.0182 | 0.122 | -0.191 | 0.0626 | -0.0623 | 0.0511 | 0.0722 | -0.0914 | 0.0431 | 0.0410 | -0.254 | -0.0397 | 0.0124 | -0.136 | 0.164 | 0.162 | 0.184 | 0.0378 | 2.01e+03 | 3.00 | 5.00 | 1.17e+09 | 2.01e+03 |
| 9,223 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.147 | 0.199 | 0.370 | 0.0113 | 0.00129 | 0.550 | -0.0127 | 0.0527 | -0.210 | 0.0391 | -0.0799 | 0.225 | -0.0199 | 0.0512 | 0.0461 | 0.00918 | -0.0486 | -0.118 | 0.0450 | -0.137 | 0.0333 | -0.296 | -0.147 | -0.0908 | 0.0845 | 0.0866 | -0.123 | -0.0714 | 0.212 | -0.0761 | 0.00 | 0.0500 | 0.0114 | 0.0106 | 0.0892 | 0.122 | 0.520 | 0.271 | 0.0834 | -0.199 | -0.111 | -0.00620 | 0.815 | 0.237 | 0.187 | -0.160 | -0.0112 | -0.129 | 0.0219 | -0.00220 | -0.0851 | -0.177 | -0.0202 | 0.0972 | 0.0868 | 0.0495 | -0.00947 | 0.210 | -0.178 | -0.00630 | -0.0292 | 2.02e+03 | 11.0 | 3.00 | 1.45e+09 | 2.02e+03 |
| 9,224 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.105 | 0.157 | 0.0427 | -0.0275 | -0.237 | -0.0218 | -0.0836 | -0.0329 | 0.0707 | -0.0263 | 0.0240 | -0.0619 | -0.0814 | 0.0185 | 0.0187 | 0.0378 | -0.0321 | 0.00937 | -0.0794 | 0.0853 | -0.0303 | 0.0463 | 0.102 | -0.0503 | -0.0433 | -0.0295 | -0.0226 | -0.0435 | 0.124 | -0.0436 | 0.00 | 0.0622 | 0.229 | 0.00245 | -0.0313 | 0.0356 | -0.00290 | 0.00727 | 0.0515 | 0.0472 | -0.00976 | 0.0784 | -0.00967 | -0.131 | 0.252 | 0.152 | 0.0309 | -0.0991 | -0.0162 | -0.00195 | 0.000451 | 0.0173 | 0.00436 | 0.0395 | 0.0224 | -0.0234 | 0.0103 | -0.0385 | -0.0328 | 0.0296 | -0.00404 | 1.99e+03 | 11.0 | 28.0 | 5.97e+08 | 1.99e+03 |
| 9,225 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.142 | 0.253 | 0.431 | -0.00543 | 0.0660 | -0.0169 | -0.0222 | 0.0217 | -0.112 | 0.0670 | 0.233 | 0.136 | 0.0419 | 0.0894 | 0.0877 | 0.0541 | 0.0240 | -0.179 | -0.0490 | -0.0388 | 0.00886 | -0.0414 | 0.0132 | -0.0101 | -0.0869 | 0.0293 | -0.109 | 0.0338 | 0.143 | -0.0483 | 1.00 | 0.00774 | -5.34e-05 | 0.0428 | 0.0203 | 0.0429 | 0.00315 | 0.0190 | -0.00684 | 0.0168 | 0.0226 | 0.00579 | -0.0132 | 0.00341 | 0.00496 | -0.00566 | 0.000368 | -0.00198 | 0.0253 | -0.00151 | 0.00515 | 0.0197 | -0.0121 | -0.0159 | 0.00727 | 0.00799 | 0.0206 | 0.00858 | -0.0233 | -0.0311 | 0.0183 | 2.00e+03 | 4.00 | 30.0 | 9.89e+08 | 2.00e+03 |
| 9,226 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.0668 | 0.137 | -0.0695 | -0.0385 | 0.00973 | -0.00640 | 0.0185 | 0.00935 | -0.0521 | 0.0368 | 0.00267 | 0.0847 | -0.0996 | 0.220 | 0.0583 | 0.0165 | 0.0490 | -0.355 | 0.0979 | -0.408 | 0.345 | -0.490 | 0.395 | -0.687 | 0.119 | -0.295 | -0.108 | 0.179 | -0.219 | -0.00387 | 0.00 | 0.201 | 0.112 | 0.0314 | 0.881 | -0.611 | 0.117 | 0.0993 | -0.0987 | 0.0928 | -0.0567 | 0.0543 | -0.0508 | -0.0906 | 0.0323 | -0.102 | -0.0345 | -0.0376 | -0.0373 | -0.0343 | -0.0783 | 0.0573 | 0.0390 | -0.0415 | 0.0259 | 0.00364 | 0.0499 | 0.0726 | -0.0222 | -0.0207 | -0.0739 | 2.01e+03 | 9.00 | 5.00 | 1.16e+09 | 2.01e+03 |
| 9,227 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.122 | 0.232 | -0.105 | -0.0828 | -0.0926 | -0.0381 | -0.0450 | -0.00406 | 0.0190 | 0.0154 | 0.00628 | 0.116 | 0.0128 | 0.102 | 0.0630 | 0.108 | 0.0391 | -0.0602 | -0.0222 | 0.0536 | -0.0698 | -0.0173 | 0.0901 | 0.0452 | -0.0236 | 0.0738 | -0.00836 | 0.0556 | 0.0751 | -0.0465 | 0.00 | 0.0339 | 0.0105 | 0.0290 | 0.137 | 0.230 | -0.0199 | -0.00293 | -0.0603 | -0.0148 | 0.0251 | 0.0193 | -0.0732 | -0.00261 | 0.0958 | -0.129 | -0.00912 | -0.0180 | 0.242 | -0.0296 | 0.0176 | -0.0280 | -0.0517 | -0.112 | -0.0107 | 0.00437 | 0.0339 | 0.0350 | -0.0535 | -0.0544 | 0.0197 | 2.01e+03 | 1.00 | 30.0 | 1.33e+09 | 2.01e+03 |
gender_F
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.404 ± 0.491
- Median ± IQR
- 0.00 ± 1.00
- Min | Max
- 0.00 | 1.00
gender_M
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.594 ± 0.491
- Median ± IQR
- 1.00 ± 1.00
- Min | Max
- 0.00 | 1.00
gender_nan
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00184 ± 0.0429
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_BOA
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.000325 ± 0.0180
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_BOE
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00282 ± 0.0530
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_CAT
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00780 ± 0.0880
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_CCL
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00964 ± 0.0977
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_CEC
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00802 ± 0.0892
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_CEX
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00390 ± 0.0623
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_COR
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0522 ± 0.223
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_CUS
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00293 ± 0.0540
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_DEP
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0173 ± 0.131
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_DGS
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0438 ± 0.205
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_DHS
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00130 ± 0.0360
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_DLC
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0442 ± 0.206
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_DOT
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.133 ± 0.339
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_DPS
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0239 ± 0.153
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_DTS
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0157 ± 0.124
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_ECM
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.000325 ± 0.0180
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_FIN
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0125 ± 0.111
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_FRS
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.142 ± 0.349
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_HCA
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00802 ± 0.0892
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_HHS
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.169 ± 0.374
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_HRC
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.000867 ± 0.0294
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_IGR
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.000542 ± 0.0233
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_LIB
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0406 ± 0.197
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_MPB
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.000217 ± 0.0147
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_NDA
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00152 ± 0.0389
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_OAG
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00119 ± 0.0345
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_OCP
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00173 ± 0.0416
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_OHR
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00704 ± 0.0836
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_OIG
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.000650 ± 0.0255
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_OLO
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00119 ± 0.0345
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_OMB
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00336 ± 0.0579
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_PIO
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00629 ± 0.0790
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_POL
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.200 ± 0.400
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_PRO
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00325 ± 0.0569
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_REC
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0134 ± 0.115
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_SHF
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0195 ± 0.138
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_ZAH
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.000433 ± 0.0208
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Board of Appeals Department
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.000325 ± 0.0180
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Board of Elections
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00282 ± 0.0530
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Community Engagement Cluster
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00802 ± 0.0892
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Community Use of Public Facilities
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00293 ± 0.0540
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Correction and Rehabilitation
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0522 ± 0.223
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_County Attorney's Office
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00780 ± 0.0880
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_County Council
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00964 ± 0.0977
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Department of Environmental Protection
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0173 ± 0.131
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Department of Finance
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0125 ± 0.111
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Department of General Services
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0438 ± 0.205
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Department of Health and Human Services
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.169 ± 0.374
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Department of Housing and Community Affairs
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00802 ± 0.0892
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Department of Liquor Control
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0442 ± 0.206
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Department of Permitting Services
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0239 ± 0.153
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Department of Police
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.200 ± 0.400
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Department of Public Libraries
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0406 ± 0.197
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Department of Recreation
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0134 ± 0.115
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Department of Technology Services
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0157 ± 0.124
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Department of Transportation
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.133 ± 0.339
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Ethics Commission
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.000325 ± 0.0180
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Fire and Rescue Services
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.142 ± 0.349
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Merit System Protection Board Department
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.000217 ± 0.0147
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Non-Departmental Account
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00152 ± 0.0389
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Office of Agriculture
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00119 ± 0.0345
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Office of Consumer Protection
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00173 ± 0.0416
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Office of Emergency Management and Homeland Security
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00130 ± 0.0360
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Office of Human Resources
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00704 ± 0.0836
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Office of Human Rights
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.000867 ± 0.0294
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Office of Intergovernmental Relations Department
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.000542 ± 0.0233
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Office of Legislative Oversight
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00119 ± 0.0345
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Office of Management and Budget
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00336 ± 0.0579
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Office of Procurement
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00325 ± 0.0569
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Office of Public Information
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00629 ± 0.0790
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Office of Zoning and Administrative Hearings
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.000433 ± 0.0208
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Office of the Inspector General
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.000650 ± 0.0255
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Offices of the County Executive
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.00390 ± 0.0623
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
department_name_Sheriff's Office
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0195 ± 0.138
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
division_00
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
685 (7.4%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.223 ± 0.281
- Median ± IQR
- 0.134 ± 0.209
- Min | Max
- 8.44e-05 | 1.13
division_01
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
685 (7.4%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.179 ± 0.280
- Median ± IQR
- 0.177 ± 0.315
- Min | Max
- -0.551 | 0.784
division_02
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
686 (7.4%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0284 ± 0.314
- Median ± IQR
- -0.00739 ± 0.170
- Min | Max
- -0.615 | 0.977
division_03
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
685 (7.4%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0428 ± 0.305
- Median ± IQR
- -0.00381 ± 0.0684
- Min | Max
- -0.443 | 1.10
division_04
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
692 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- -0.0379 ± 0.233
- Median ± IQR
- -0.00801 ± 0.201
- Min | Max
- -0.774 | 0.362
division_05
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
691 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- -0.0430 ± 0.218
- Median ± IQR
- -0.0435 ± 0.113
- Min | Max
- -0.678 | 0.691
division_06
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0115 ± 0.212
- Median ± IQR
- -0.00442 ± 0.110
- Min | Max
- -0.338 | 1.20
division_07
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.00129 ± 0.206
- Median ± IQR
- -0.00478 ± 0.0443
- Min | Max
- -0.822 | 0.942
division_08
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
693 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- -0.0148 ± 0.199
- Median ± IQR
- -0.0126 ± 0.0876
- Min | Max
- -0.826 | 0.674
division_09
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0293 ± 0.188
- Median ± IQR
- 0.00184 ± 0.0314
- Min | Max
- -0.178 | 1.31
division_10
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.00126 ± 0.185
- Median ± IQR
- 0.00335 ± 0.0317
- Min | Max
- -0.551 | 1.07
division_11
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0192 ± 0.175
- Median ± IQR
- 0.00609 ± 0.119
- Min | Max
- -0.637 | 0.612
division_12
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0127 ± 0.169
- Median ± IQR
- -0.00489 ± 0.0726
- Min | Max
- -0.626 | 0.919
division_13
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0291 ± 0.157
- Median ± IQR
- -0.000237 ± 0.0789
- Min | Max
- -0.398 | 1.01
division_14
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- -0.0125 ± 0.154
- Median ± IQR
- -0.00473 ± 0.0763
- Min | Max
- -0.503 | 0.559
division_15
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0101 ± 0.151
- Median ± IQR
- 0.00734 ± 0.0561
- Min | Max
- -0.580 | 0.753
division_16
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.00132 ± 0.148
- Median ± IQR
- -0.00241 ± 0.0875
- Min | Max
- -0.525 | 0.554
division_17
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- -0.0205 ± 0.140
- Median ± IQR
- 0.000690 ± 0.117
- Min | Max
- -0.424 | 0.490
division_18
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0153 ± 0.140
- Median ± IQR
- 0.00741 ± 0.0931
- Min | Max
- -0.612 | 0.507
division_19
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.00206 ± 0.140
- Median ± IQR
- 0.00127 ± 0.0773
- Min | Max
- -0.408 | 0.555
division_20
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.00865 ± 0.132
- Median ± IQR
- -0.00184 ± 0.0656
- Min | Max
- -0.661 | 0.553
division_21
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- -0.00628 ± 0.131
- Median ± IQR
- 0.00123 ± 0.0452
- Min | Max
- -0.490 | 0.821
division_22
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- -0.00681 ± 0.127
- Median ± IQR
- -0.00168 ± 0.100
- Min | Max
- -0.449 | 0.539
division_23
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- -0.00296 ± 0.121
- Median ± IQR
- 0.00108 ± 0.0727
- Min | Max
- -0.687 | 0.513
division_24
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- -0.00215 ± 0.119
- Median ± IQR
- 0.00237 ± 0.0504
- Min | Max
- -0.578 | 0.746
division_25
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.00329 ± 0.116
- Median ± IQR
- 0.00736 ± 0.0435
- Min | Max
- -0.423 | 0.736
division_26
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.000143 ± 0.115
- Median ± IQR
- -0.00414 ± 0.0677
- Min | Max
- -0.344 | 0.701
division_27
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.00854 ± 0.113
- Median ± IQR
- -0.000214 ± 0.0618
- Min | Max
- -0.434 | 0.441
division_28
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.00596 ± 0.108
- Median ± IQR
- -0.00370 ± 0.0675
- Min | Max
- -0.348 | 0.536
division_29
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
694 (7.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.00166 ± 0.107
- Median ± IQR
- -0.00197 ± 0.0732
- Min | Max
- -0.319 | 0.543
assignment_category_Parttime-Regular
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 2 (< 0.1%)
- Mean ± Std
- 0.0904 ± 0.287
- Median ± IQR
- 0.00 ± 0.00
- Min | Max
- 0.00 | 1.00
employee_position_title_00
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.230 ± 0.315
- Median ± IQR
- 0.0888 ± 0.274
- Min | Max
- 0.000534 | 1.11
employee_position_title_01
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0831 ± 0.338
- Median ± IQR
- 0.00643 ± 0.0530
- Min | Max
- -0.342 | 1.09
employee_position_title_02
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.110 ± 0.301
- Median ± IQR
- 0.0156 ± 0.0515
- Min | Max
- -0.0618 | 1.16
employee_position_title_03
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.108 ± 0.275
- Median ± IQR
- 0.0336 ± 0.197
- Min | Max
- -0.164 | 0.984
employee_position_title_04
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0766 ± 0.242
- Median ± IQR
- 0.0431 ± 0.156
- Min | Max
- -0.617 | 0.658
employee_position_title_05
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0532 ± 0.208
- Median ± IQR
- 0.000350 ± 0.113
- Min | Max
- -0.315 | 0.954
employee_position_title_06
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0332 ± 0.192
- Median ± IQR
- 0.00455 ± 0.168
- Min | Max
- -0.323 | 0.782
employee_position_title_07
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0123 ± 0.190
- Median ± IQR
- -0.00157 ± 0.136
- Min | Max
- -0.547 | 0.640
employee_position_title_08
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0359 ± 0.178
- Median ± IQR
- 0.00363 ± 0.135
- Min | Max
- -0.312 | 0.590
employee_position_title_09
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.00945 ± 0.181
- Median ± IQR
- -0.00300 ± 0.0589
- Min | Max
- -0.620 | 0.812
employee_position_title_10
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0198 ± 0.175
- Median ± IQR
- -0.00949 ± 0.0975
- Min | Max
- -0.503 | 0.731
employee_position_title_11
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- -0.000953 ± 0.174
- Median ± IQR
- 0.0114 ± 0.0823
- Min | Max
- -0.458 | 0.815
employee_position_title_12
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- -0.00365 ± 0.168
- Median ± IQR
- -0.00364 ± 0.0898
- Min | Max
- -0.332 | 0.961
employee_position_title_13
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0136 ± 0.165
- Median ± IQR
- 0.00565 ± 0.123
- Min | Max
- -0.331 | 0.649
employee_position_title_14
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.00150 ± 0.161
- Median ± IQR
- -0.0214 ± 0.194
- Min | Max
- -0.375 | 0.465
employee_position_title_15
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0191 ± 0.155
- Median ± IQR
- 0.000369 ± 0.0467
- Min | Max
- -0.203 | 1.10
employee_position_title_16
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0113 ± 0.147
- Median ± IQR
- -0.000235 ± 0.104
- Min | Max
- -0.311 | 0.839
employee_position_title_17
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.00432 ± 0.140
- Median ± IQR
- -0.00157 ± 0.0777
- Min | Max
- -0.260 | 0.757
employee_position_title_18
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.00522 ± 0.137
- Median ± IQR
- 0.00168 ± 0.0791
- Min | Max
- -0.377 | 1.00
employee_position_title_19
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.0104 ± 0.133
- Median ± IQR
- -0.00249 ± 0.111
- Min | Max
- -0.343 | 0.467
employee_position_title_20
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- -0.00301 ± 0.130
- Median ± IQR
- -0.00930 ± 0.0900
- Min | Max
- -0.436 | 0.485
employee_position_title_21
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.00397 ± 0.128
- Median ± IQR
- -0.0141 ± 0.125
- Min | Max
- -0.537 | 0.553
employee_position_title_22
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.00137 ± 0.126
- Median ± IQR
- -0.000541 ± 0.0875
- Min | Max
- -0.336 | 0.500
employee_position_title_23
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.00773 ± 0.122
- Median ± IQR
- -0.00578 ± 0.0507
- Min | Max
- -0.328 | 0.945
employee_position_title_24
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- -0.00129 ± 0.122
- Median ± IQR
- 0.00416 ± 0.0376
- Min | Max
- -0.589 | 0.689
employee_position_title_25
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.00927 ± 0.119
- Median ± IQR
- 0.00526 ± 0.106
- Min | Max
- -0.189 | 0.661
employee_position_title_26
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- -0.000887 ± 0.114
- Median ± IQR
- 0.00149 ± 0.0879
- Min | Max
- -0.384 | 0.490
employee_position_title_27
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- -0.00417 ± 0.108
- Median ± IQR
- -0.00195 ± 0.0559
- Min | Max
- -0.472 | 0.417
employee_position_title_28
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- 0.00111 ± 0.104
- Median ± IQR
- -0.00331 ± 0.0733
- Min | Max
- -0.284 | 0.633
employee_position_title_29
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
443 (4.8%)
This column has a high cardinality (> 40).
- Mean ± Std
- -0.00582 ± 0.0973
- Median ± IQR
- 0.0142 ± 0.0607
- Min | Max
- -0.833 | 0.174
date_first_hired_year
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
51 (0.6%)
This column has a high cardinality (> 40).
- Mean ± Std
- 2.00e+03 ± 9.33
- Median ± IQR
- 2.00e+03 ± 14.0
- Min | Max
- 1.96e+03 | 2.02e+03
date_first_hired_month
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 12 (0.1%)
- Mean ± Std
- 6.35 ± 3.48
- Median ± IQR
- 7.00 ± 6.00
- Min | Max
- 1.00 | 12.0
date_first_hired_day
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 31 (0.3%)
- Mean ± Std
- 15.3 ± 8.63
- Median ± IQR
- 16.0 ± 14.0
- Min | Max
- 1.00 | 31.0
date_first_hired_total_seconds
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
2,264 (24.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 1.08e+09 ± 2.94e+08
- Median ± IQR
- 1.12e+09 ± 4.41e+08
- Min | Max
- -1.34e+08 | 1.48e+09
year_first_hired
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
51 (0.6%)
This column has a high cardinality (> 40).
- Mean ± Std
- 2.00e+03 ± 9.33
- Median ± IQR
- 2.00e+03 ± 14.0
- Min | Max
- 1.96e+03 | 2.02e+03
No columns match the selected filter: . You can change the column filter in the dropdown menu above.
|
Column
|
Column name
|
dtype
|
Is sorted
|
Null values
|
Unique values
|
Mean
|
Std
|
Min
|
Median
|
Max
|
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | gender_F | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.404 | 0.491 | 0.00 | 0.00 | 1.00 |
| 1 | gender_M | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.594 | 0.491 | 0.00 | 1.00 | 1.00 |
| 2 | gender_nan | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00184 | 0.0429 | 0.00 | 0.00 | 1.00 |
| 3 | department_BOA | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.000325 | 0.0180 | 0.00 | 0.00 | 1.00 |
| 4 | department_BOE | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00282 | 0.0530 | 0.00 | 0.00 | 1.00 |
| 5 | department_CAT | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00780 | 0.0880 | 0.00 | 0.00 | 1.00 |
| 6 | department_CCL | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00964 | 0.0977 | 0.00 | 0.00 | 1.00 |
| 7 | department_CEC | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00802 | 0.0892 | 0.00 | 0.00 | 1.00 |
| 8 | department_CEX | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00390 | 0.0623 | 0.00 | 0.00 | 1.00 |
| 9 | department_COR | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0522 | 0.223 | 0.00 | 0.00 | 1.00 |
| 10 | department_CUS | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00293 | 0.0540 | 0.00 | 0.00 | 1.00 |
| 11 | department_DEP | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0173 | 0.131 | 0.00 | 0.00 | 1.00 |
| 12 | department_DGS | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0438 | 0.205 | 0.00 | 0.00 | 1.00 |
| 13 | department_DHS | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00130 | 0.0360 | 0.00 | 0.00 | 1.00 |
| 14 | department_DLC | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0442 | 0.206 | 0.00 | 0.00 | 1.00 |
| 15 | department_DOT | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.133 | 0.339 | 0.00 | 0.00 | 1.00 |
| 16 | department_DPS | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0239 | 0.153 | 0.00 | 0.00 | 1.00 |
| 17 | department_DTS | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0157 | 0.124 | 0.00 | 0.00 | 1.00 |
| 18 | department_ECM | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.000325 | 0.0180 | 0.00 | 0.00 | 1.00 |
| 19 | department_FIN | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0125 | 0.111 | 0.00 | 0.00 | 1.00 |
| 20 | department_FRS | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.142 | 0.349 | 0.00 | 0.00 | 1.00 |
| 21 | department_HCA | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00802 | 0.0892 | 0.00 | 0.00 | 1.00 |
| 22 | department_HHS | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.169 | 0.374 | 0.00 | 0.00 | 1.00 |
| 23 | department_HRC | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.000867 | 0.0294 | 0.00 | 0.00 | 1.00 |
| 24 | department_IGR | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.000542 | 0.0233 | 0.00 | 0.00 | 1.00 |
| 25 | department_LIB | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0406 | 0.197 | 0.00 | 0.00 | 1.00 |
| 26 | department_MPB | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.000217 | 0.0147 | 0.00 | 0.00 | 1.00 |
| 27 | department_NDA | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00152 | 0.0389 | 0.00 | 0.00 | 1.00 |
| 28 | department_OAG | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00119 | 0.0345 | 0.00 | 0.00 | 1.00 |
| 29 | department_OCP | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00173 | 0.0416 | 0.00 | 0.00 | 1.00 |
| 30 | department_OHR | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00704 | 0.0836 | 0.00 | 0.00 | 1.00 |
| 31 | department_OIG | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.000650 | 0.0255 | 0.00 | 0.00 | 1.00 |
| 32 | department_OLO | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00119 | 0.0345 | 0.00 | 0.00 | 1.00 |
| 33 | department_OMB | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00336 | 0.0579 | 0.00 | 0.00 | 1.00 |
| 34 | department_PIO | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00629 | 0.0790 | 0.00 | 0.00 | 1.00 |
| 35 | department_POL | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.200 | 0.400 | 0.00 | 0.00 | 1.00 |
| 36 | department_PRO | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00325 | 0.0569 | 0.00 | 0.00 | 1.00 |
| 37 | department_REC | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0134 | 0.115 | 0.00 | 0.00 | 1.00 |
| 38 | department_SHF | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0195 | 0.138 | 0.00 | 0.00 | 1.00 |
| 39 | department_ZAH | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.000433 | 0.0208 | 0.00 | 0.00 | 1.00 |
| 40 | department_name_Board of Appeals Department | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.000325 | 0.0180 | 0.00 | 0.00 | 1.00 |
| 41 | department_name_Board of Elections | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00282 | 0.0530 | 0.00 | 0.00 | 1.00 |
| 42 | department_name_Community Engagement Cluster | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00802 | 0.0892 | 0.00 | 0.00 | 1.00 |
| 43 | department_name_Community Use of Public Facilities | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00293 | 0.0540 | 0.00 | 0.00 | 1.00 |
| 44 | department_name_Correction and Rehabilitation | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0522 | 0.223 | 0.00 | 0.00 | 1.00 |
| 45 | department_name_County Attorney's Office | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00780 | 0.0880 | 0.00 | 0.00 | 1.00 |
| 46 | department_name_County Council | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00964 | 0.0977 | 0.00 | 0.00 | 1.00 |
| 47 | department_name_Department of Environmental Protection | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0173 | 0.131 | 0.00 | 0.00 | 1.00 |
| 48 | department_name_Department of Finance | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0125 | 0.111 | 0.00 | 0.00 | 1.00 |
| 49 | department_name_Department of General Services | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0438 | 0.205 | 0.00 | 0.00 | 1.00 |
| 50 | department_name_Department of Health and Human Services | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.169 | 0.374 | 0.00 | 0.00 | 1.00 |
| 51 | department_name_Department of Housing and Community Affairs | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00802 | 0.0892 | 0.00 | 0.00 | 1.00 |
| 52 | department_name_Department of Liquor Control | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0442 | 0.206 | 0.00 | 0.00 | 1.00 |
| 53 | department_name_Department of Permitting Services | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0239 | 0.153 | 0.00 | 0.00 | 1.00 |
| 54 | department_name_Department of Police | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.200 | 0.400 | 0.00 | 0.00 | 1.00 |
| 55 | department_name_Department of Public Libraries | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0406 | 0.197 | 0.00 | 0.00 | 1.00 |
| 56 | department_name_Department of Recreation | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0134 | 0.115 | 0.00 | 0.00 | 1.00 |
| 57 | department_name_Department of Technology Services | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0157 | 0.124 | 0.00 | 0.00 | 1.00 |
| 58 | department_name_Department of Transportation | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.133 | 0.339 | 0.00 | 0.00 | 1.00 |
| 59 | department_name_Ethics Commission | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.000325 | 0.0180 | 0.00 | 0.00 | 1.00 |
| 60 | department_name_Fire and Rescue Services | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.142 | 0.349 | 0.00 | 0.00 | 1.00 |
| 61 | department_name_Merit System Protection Board Department | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.000217 | 0.0147 | 0.00 | 0.00 | 1.00 |
| 62 | department_name_Non-Departmental Account | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00152 | 0.0389 | 0.00 | 0.00 | 1.00 |
| 63 | department_name_Office of Agriculture | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00119 | 0.0345 | 0.00 | 0.00 | 1.00 |
| 64 | department_name_Office of Consumer Protection | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00173 | 0.0416 | 0.00 | 0.00 | 1.00 |
| 65 | department_name_Office of Emergency Management and Homeland Security | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00130 | 0.0360 | 0.00 | 0.00 | 1.00 |
| 66 | department_name_Office of Human Resources | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00704 | 0.0836 | 0.00 | 0.00 | 1.00 |
| 67 | department_name_Office of Human Rights | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.000867 | 0.0294 | 0.00 | 0.00 | 1.00 |
| 68 | department_name_Office of Intergovernmental Relations Department | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.000542 | 0.0233 | 0.00 | 0.00 | 1.00 |
| 69 | department_name_Office of Legislative Oversight | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00119 | 0.0345 | 0.00 | 0.00 | 1.00 |
| 70 | department_name_Office of Management and Budget | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00336 | 0.0579 | 0.00 | 0.00 | 1.00 |
| 71 | department_name_Office of Procurement | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00325 | 0.0569 | 0.00 | 0.00 | 1.00 |
| 72 | department_name_Office of Public Information | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00629 | 0.0790 | 0.00 | 0.00 | 1.00 |
| 73 | department_name_Office of Zoning and Administrative Hearings | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.000433 | 0.0208 | 0.00 | 0.00 | 1.00 |
| 74 | department_name_Office of the Inspector General | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.000650 | 0.0255 | 0.00 | 0.00 | 1.00 |
| 75 | department_name_Offices of the County Executive | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.00390 | 0.0623 | 0.00 | 0.00 | 1.00 |
| 76 | department_name_Sheriff's Office | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0195 | 0.138 | 0.00 | 0.00 | 1.00 |
| 77 | division_00 | Float32DType | False | 0 (0.0%) | 685 (7.4%) | 0.223 | 0.281 | 8.44e-05 | 0.134 | 1.13 |
| 78 | division_01 | Float32DType | False | 0 (0.0%) | 685 (7.4%) | 0.179 | 0.280 | -0.551 | 0.177 | 0.784 |
| 79 | division_02 | Float32DType | False | 0 (0.0%) | 686 (7.4%) | 0.0284 | 0.314 | -0.615 | -0.00739 | 0.977 |
| 80 | division_03 | Float32DType | False | 0 (0.0%) | 685 (7.4%) | 0.0428 | 0.305 | -0.443 | -0.00381 | 1.10 |
| 81 | division_04 | Float32DType | False | 0 (0.0%) | 692 (7.5%) | -0.0379 | 0.233 | -0.774 | -0.00801 | 0.362 |
| 82 | division_05 | Float32DType | False | 0 (0.0%) | 691 (7.5%) | -0.0430 | 0.218 | -0.678 | -0.0435 | 0.691 |
| 83 | division_06 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | 0.0115 | 0.212 | -0.338 | -0.00442 | 1.20 |
| 84 | division_07 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | 0.00129 | 0.206 | -0.822 | -0.00478 | 0.942 |
| 85 | division_08 | Float32DType | False | 0 (0.0%) | 693 (7.5%) | -0.0148 | 0.199 | -0.826 | -0.0126 | 0.674 |
| 86 | division_09 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | 0.0293 | 0.188 | -0.178 | 0.00184 | 1.31 |
| 87 | division_10 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | 0.00126 | 0.185 | -0.551 | 0.00335 | 1.07 |
| 88 | division_11 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | 0.0192 | 0.175 | -0.637 | 0.00609 | 0.612 |
| 89 | division_12 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | 0.0127 | 0.169 | -0.626 | -0.00489 | 0.919 |
| 90 | division_13 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | 0.0291 | 0.157 | -0.398 | -0.000237 | 1.01 |
| 91 | division_14 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | -0.0125 | 0.154 | -0.503 | -0.00473 | 0.559 |
| 92 | division_15 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | 0.0101 | 0.151 | -0.580 | 0.00734 | 0.753 |
| 93 | division_16 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | 0.00132 | 0.148 | -0.525 | -0.00241 | 0.554 |
| 94 | division_17 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | -0.0205 | 0.140 | -0.424 | 0.000690 | 0.490 |
| 95 | division_18 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | 0.0153 | 0.140 | -0.612 | 0.00741 | 0.507 |
| 96 | division_19 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | 0.00206 | 0.140 | -0.408 | 0.00127 | 0.555 |
| 97 | division_20 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | 0.00865 | 0.132 | -0.661 | -0.00184 | 0.553 |
| 98 | division_21 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | -0.00628 | 0.131 | -0.490 | 0.00123 | 0.821 |
| 99 | division_22 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | -0.00681 | 0.127 | -0.449 | -0.00168 | 0.539 |
| 100 | division_23 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | -0.00296 | 0.121 | -0.687 | 0.00108 | 0.513 |
| 101 | division_24 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | -0.00215 | 0.119 | -0.578 | 0.00237 | 0.746 |
| 102 | division_25 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | 0.00329 | 0.116 | -0.423 | 0.00736 | 0.736 |
| 103 | division_26 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | 0.000143 | 0.115 | -0.344 | -0.00414 | 0.701 |
| 104 | division_27 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | 0.00854 | 0.113 | -0.434 | -0.000214 | 0.441 |
| 105 | division_28 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | 0.00596 | 0.108 | -0.348 | -0.00370 | 0.536 |
| 106 | division_29 | Float32DType | False | 0 (0.0%) | 694 (7.5%) | 0.00166 | 0.107 | -0.319 | -0.00197 | 0.543 |
| 107 | assignment_category_Parttime-Regular | Float32DType | False | 0 (0.0%) | 2 (< 0.1%) | 0.0904 | 0.287 | 0.00 | 0.00 | 1.00 |
| 108 | employee_position_title_00 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.230 | 0.315 | 0.000534 | 0.0888 | 1.11 |
| 109 | employee_position_title_01 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.0831 | 0.338 | -0.342 | 0.00643 | 1.09 |
| 110 | employee_position_title_02 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.110 | 0.301 | -0.0618 | 0.0156 | 1.16 |
| 111 | employee_position_title_03 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.108 | 0.275 | -0.164 | 0.0336 | 0.984 |
| 112 | employee_position_title_04 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.0766 | 0.242 | -0.617 | 0.0431 | 0.658 |
| 113 | employee_position_title_05 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.0532 | 0.208 | -0.315 | 0.000350 | 0.954 |
| 114 | employee_position_title_06 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.0332 | 0.192 | -0.323 | 0.00455 | 0.782 |
| 115 | employee_position_title_07 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.0123 | 0.190 | -0.547 | -0.00157 | 0.640 |
| 116 | employee_position_title_08 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.0359 | 0.178 | -0.312 | 0.00363 | 0.590 |
| 117 | employee_position_title_09 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.00945 | 0.181 | -0.620 | -0.00300 | 0.812 |
| 118 | employee_position_title_10 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.0198 | 0.175 | -0.503 | -0.00949 | 0.731 |
| 119 | employee_position_title_11 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | -0.000953 | 0.174 | -0.458 | 0.0114 | 0.815 |
| 120 | employee_position_title_12 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | -0.00365 | 0.168 | -0.332 | -0.00364 | 0.961 |
| 121 | employee_position_title_13 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.0136 | 0.165 | -0.331 | 0.00565 | 0.649 |
| 122 | employee_position_title_14 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.00150 | 0.161 | -0.375 | -0.0214 | 0.465 |
| 123 | employee_position_title_15 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.0191 | 0.155 | -0.203 | 0.000369 | 1.10 |
| 124 | employee_position_title_16 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.0113 | 0.147 | -0.311 | -0.000235 | 0.839 |
| 125 | employee_position_title_17 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.00432 | 0.140 | -0.260 | -0.00157 | 0.757 |
| 126 | employee_position_title_18 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.00522 | 0.137 | -0.377 | 0.00168 | 1.00 |
| 127 | employee_position_title_19 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.0104 | 0.133 | -0.343 | -0.00249 | 0.467 |
| 128 | employee_position_title_20 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | -0.00301 | 0.130 | -0.436 | -0.00930 | 0.485 |
| 129 | employee_position_title_21 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.00397 | 0.128 | -0.537 | -0.0141 | 0.553 |
| 130 | employee_position_title_22 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.00137 | 0.126 | -0.336 | -0.000541 | 0.500 |
| 131 | employee_position_title_23 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.00773 | 0.122 | -0.328 | -0.00578 | 0.945 |
| 132 | employee_position_title_24 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | -0.00129 | 0.122 | -0.589 | 0.00416 | 0.689 |
| 133 | employee_position_title_25 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.00927 | 0.119 | -0.189 | 0.00526 | 0.661 |
| 134 | employee_position_title_26 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | -0.000887 | 0.114 | -0.384 | 0.00149 | 0.490 |
| 135 | employee_position_title_27 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | -0.00417 | 0.108 | -0.472 | -0.00195 | 0.417 |
| 136 | employee_position_title_28 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | 0.00111 | 0.104 | -0.284 | -0.00331 | 0.633 |
| 137 | employee_position_title_29 | Float32DType | False | 0 (0.0%) | 443 (4.8%) | -0.00582 | 0.0973 | -0.833 | 0.0142 | 0.174 |
| 138 | date_first_hired_year | Float32DType | False | 0 (0.0%) | 51 (0.6%) | 2.00e+03 | 9.33 | 1.96e+03 | 2.00e+03 | 2.02e+03 |
| 139 | date_first_hired_month | Float32DType | False | 0 (0.0%) | 12 (0.1%) | 6.35 | 3.48 | 1.00 | 7.00 | 12.0 |
| 140 | date_first_hired_day | Float32DType | False | 0 (0.0%) | 31 (0.3%) | 15.3 | 8.63 | 1.00 | 16.0 | 31.0 |
| 141 | date_first_hired_total_seconds | Float32DType | False | 0 (0.0%) | 2264 (24.5%) | 1.08e+09 | 2.94e+08 | -1.34e+08 | 1.12e+09 | 1.48e+09 |
| 142 | year_first_hired | Float32DType | False | 0 (0.0%) | 51 (0.6%) | 2.00e+03 | 9.33 | 1.96e+03 | 2.00e+03 | 2.02e+03 |
No columns match the selected filter: . You can change the column filter in the dropdown menu above.
Plotting was skipped. This is due to either:
- The dataframe exceeding the configured
table_report_plots_thresholdlimit (default: 30). - The
plot_distributionsoption being set toFalse(default:"auto", which applies the configuredtable_report_plots_threshold).
You can adjust this behavior in several ways:
- To force plotting for a single report:
report = TableReport(df, plot_distributions=True) - To change the threshold for the current Python session, use
skrub.set_config:from skrub import set_config set_config(table_report_plots_threshold=50) - To make the change permanent, use an environment variable:
export SKB_TABLE_REPORT_PLOTS_THRESHOLD=50
No columns match the selected filter: . You can change the column filter in the dropdown menu above.
Computing pairwise associations was skipped. This is due to either:
- The dataframe exceeding the configured
table_report_associations_thresholdlimit (default: 30). - The
compute_associationsoption being set toFalse(default:"auto", which applies the configuredtable_report_associations_threshold).
You can adjust this behavior in several ways:
- To force computation for a single report:
report = TableReport(df, compute_associations=True) - To change the threshold for the current Python session, use
skrub.set_config:from skrub import set_config set_config(table_report_associations_threshold=50) - To make the change permanent, use an environment variable:
export SKB_TABLE_REPORT_ASSOCIATIONS_THRESHOLD=50
Please enable javascript
The skrub table reports need javascript to display correctly. If you are displaying a report in a Jupyter notebook and you see this message, you may need to re-execute the cell or to trust the notebook (button on the top right or "File > Trust notebook").
From our 8 columns, the TableVectorizer has extracted 143 numerical
features. Most of them are one-hot encoded representations of the categorical
features. For example, we can see that 3 columns 'gender_F', 'gender_M',
'gender_nan' were created to encode the 'gender' column.
By performing appropriate transformations on our complex data, the TableVectorizer
produced numeric features that we can use for machine-learning:
from sklearn.ensemble import HistGradientBoostingRegressor
HistGradientBoostingRegressor().fit(vectorized_X, y)
HistGradientBoostingRegressor()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
Parameters
Fitted attributes
The TableVectorizer bridges the gap between tabular data and machine-learning
pipelines. It allows us to apply a machine-learning estimator to our dataframe without
manual data wrangling and feature extraction.
Inspecting the TableVectorizer#
The TableVectorizer distinguishes between 4 basic kinds of columns (more may be
added in the future).
For each kind, it applies a different transformation, which we can configure. The
kinds of columns and the default transformation for each of them are:
numeric columns: simply casting to floating-point
datetime columns: extracting features such as year, day, hour with the
DatetimeEncoderlow-cardinality categorical columns: one-hot encoding
high-cardinality categorical columns: a simple and effective text representation pipeline provided by the
GapEncoder
TableVectorizer()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
Parameters
Fitted attributes
['year_first_hired']
Parameters
['date_first_hired']
Parameters
['gender', 'department', 'department_name', 'assignment_category']
Parameters
['division', 'employee_position_title']
Parameters
143 features
| gender_F |
| gender_M |
| gender_nan |
| department_BOA |
| department_BOE |
| department_CAT |
| department_CCL |
| department_CEC |
| department_CEX |
| department_COR |
| department_CUS |
| department_DEP |
| department_DGS |
| department_DHS |
| department_DLC |
| department_DOT |
| department_DPS |
| department_DTS |
| department_ECM |
| department_FIN |
| department_FRS |
| department_HCA |
| department_HHS |
| department_HRC |
| department_IGR |
| department_LIB |
| department_MPB |
| department_NDA |
| department_OAG |
| department_OCP |
| department_OHR |
| department_OIG |
| department_OLO |
| department_OMB |
| department_PIO |
| department_POL |
| department_PRO |
| department_REC |
| department_SHF |
| department_ZAH |
| department_name_Board of Appeals Department |
| department_name_Board of Elections |
| department_name_Community Engagement Cluster |
| department_name_Community Use of Public Facilities |
| department_name_Correction and Rehabilitation |
| department_name_County Attorney's Office |
| department_name_County Council |
| department_name_Department of Environmental Protection |
| department_name_Department of Finance |
| department_name_Department of General Services |
| department_name_Department of Health and Human Services |
| department_name_Department of Housing and Community Affairs |
| department_name_Department of Liquor Control |
| department_name_Department of Permitting Services |
| department_name_Department of Police |
| department_name_Department of Public Libraries |
| department_name_Department of Recreation |
| department_name_Department of Technology Services |
| department_name_Department of Transportation |
| department_name_Ethics Commission |
| department_name_Fire and Rescue Services |
| department_name_Merit System Protection Board Department |
| department_name_Non-Departmental Account |
| department_name_Office of Agriculture |
| department_name_Office of Consumer Protection |
| department_name_Office of Emergency Management and Homeland Security |
| department_name_Office of Human Resources |
| department_name_Office of Human Rights |
| department_name_Office of Intergovernmental Relations Department |
| department_name_Office of Legislative Oversight |
| department_name_Office of Management and Budget |
| department_name_Office of Procurement |
| department_name_Office of Public Information |
| department_name_Office of Zoning and Administrative Hearings |
| department_name_Office of the Inspector General |
| department_name_Offices of the County Executive |
| department_name_Sheriff's Office |
| division_00 |
| division_01 |
| division_02 |
| division_03 |
| division_04 |
| division_05 |
| division_06 |
| division_07 |
| division_08 |
| division_09 |
| division_10 |
| division_11 |
| division_12 |
| division_13 |
| division_14 |
| division_15 |
| division_16 |
| division_17 |
| division_18 |
| division_19 |
| division_20 |
| division_21 |
| division_22 |
| division_23 |
| division_24 |
| division_25 |
| division_26 |
| division_27 |
| division_28 |
| division_29 |
| assignment_category_Parttime-Regular |
| employee_position_title_00 |
| employee_position_title_01 |
| employee_position_title_02 |
| employee_position_title_03 |
| employee_position_title_04 |
| employee_position_title_05 |
| employee_position_title_06 |
| employee_position_title_07 |
| employee_position_title_08 |
| employee_position_title_09 |
| employee_position_title_10 |
| employee_position_title_11 |
| employee_position_title_12 |
| employee_position_title_13 |
| employee_position_title_14 |
| employee_position_title_15 |
| employee_position_title_16 |
| employee_position_title_17 |
| employee_position_title_18 |
| employee_position_title_19 |
| employee_position_title_20 |
| employee_position_title_21 |
| employee_position_title_22 |
| employee_position_title_23 |
| employee_position_title_24 |
| employee_position_title_25 |
| employee_position_title_26 |
| employee_position_title_27 |
| employee_position_title_28 |
| employee_position_title_29 |
| date_first_hired_year |
| date_first_hired_month |
| date_first_hired_day |
| date_first_hired_total_seconds |
| year_first_hired |
We can inspect which transformation was chosen for each column and retrieve the
fitted transformer. vectorizer.kind_to_columns_ provides an overview of how the
vectorizer categorized columns in our input:
{'numeric': ['year_first_hired'], 'datetime': ['date_first_hired'], 'low_cardinality': ['gender', 'department', 'department_name', 'assignment_category'], 'high_cardinality': ['division', 'employee_position_title'], 'specific': []}
The reverse mapping is given by:
{'year_first_hired': 'numeric', 'date_first_hired': 'datetime', 'gender': 'low_cardinality', 'department': 'low_cardinality', 'department_name': 'low_cardinality', 'assignment_category': 'low_cardinality', 'division': 'high_cardinality', 'employee_position_title': 'high_cardinality'}
vectorizer.transformers_ gives us a dictionary which maps column names to the
corresponding transformer.
vectorizer.transformers_["date_first_hired"]
DatetimeEncoder()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
Parameters
Fitted attributes
4 features
| date_first_hired_year |
| date_first_hired_month |
| date_first_hired_day |
| date_first_hired_total_seconds |
We can also see which features in the vectorizer’s output were derived from a given input column.
vectorizer.input_to_outputs_["date_first_hired"]
['date_first_hired_year', 'date_first_hired_month', 'date_first_hired_day', 'date_first_hired_total_seconds']
vectorized_X[vectorizer.input_to_outputs_["date_first_hired"]]
| date_first_hired_year | date_first_hired_month | date_first_hired_day | date_first_hired_total_seconds | |
|---|---|---|---|---|
| 0 | 1.99e+03 | 9.00 | 22.0 | 5.28e+08 |
| 1 | 1.99e+03 | 9.00 | 12.0 | 5.90e+08 |
| 2 | 1.99e+03 | 11.0 | 19.0 | 6.27e+08 |
| 3 | 2.01e+03 | 5.00 | 5.00 | 1.40e+09 |
| 4 | 2.01e+03 | 3.00 | 5.00 | 1.17e+09 |
| 9,223 | 2.02e+03 | 11.0 | 3.00 | 1.45e+09 |
| 9,224 | 1.99e+03 | 11.0 | 28.0 | 5.97e+08 |
| 9,225 | 2.00e+03 | 4.00 | 30.0 | 9.89e+08 |
| 9,226 | 2.01e+03 | 9.00 | 5.00 | 1.16e+09 |
| 9,227 | 2.01e+03 | 1.00 | 30.0 | 1.33e+09 |
date_first_hired_year
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
51 (0.6%)
This column has a high cardinality (> 40).
- Mean ± Std
- 2.00e+03 ± 9.33
- Median ± IQR
- 2.00e+03 ± 14.0
- Min | Max
- 1.96e+03 | 2.02e+03
date_first_hired_month
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 12 (0.1%)
- Mean ± Std
- 6.35 ± 3.48
- Median ± IQR
- 7.00 ± 6.00
- Min | Max
- 1.00 | 12.0
date_first_hired_day
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 31 (0.3%)
- Mean ± Std
- 15.3 ± 8.63
- Median ± IQR
- 16.0 ± 14.0
- Min | Max
- 1.00 | 31.0
date_first_hired_total_seconds
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
2,264 (24.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 1.08e+09 ± 2.94e+08
- Median ± IQR
- 1.12e+09 ± 4.41e+08
- Min | Max
- -1.34e+08 | 1.48e+09
No columns match the selected filter: . You can change the column filter in the dropdown menu above.
|
Column
|
Column name
|
dtype
|
Is sorted
|
Null values
|
Unique values
|
Mean
|
Std
|
Min
|
Median
|
Max
|
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | date_first_hired_year | Float32DType | False | 0 (0.0%) | 51 (0.6%) | 2.00e+03 | 9.33 | 1.96e+03 | 2.00e+03 | 2.02e+03 |
| 1 | date_first_hired_month | Float32DType | False | 0 (0.0%) | 12 (0.1%) | 6.35 | 3.48 | 1.00 | 7.00 | 12.0 |
| 2 | date_first_hired_day | Float32DType | False | 0 (0.0%) | 31 (0.3%) | 15.3 | 8.63 | 1.00 | 16.0 | 31.0 |
| 3 | date_first_hired_total_seconds | Float32DType | False | 0 (0.0%) | 2264 (24.5%) | 1.08e+09 | 2.94e+08 | -1.34e+08 | 1.12e+09 | 1.48e+09 |
No columns match the selected filter: . You can change the column filter in the dropdown menu above.
date_first_hired_year
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
51 (0.6%)
This column has a high cardinality (> 40).
- Mean ± Std
- 2.00e+03 ± 9.33
- Median ± IQR
- 2.00e+03 ± 14.0
- Min | Max
- 1.96e+03 | 2.02e+03
date_first_hired_month
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 12 (0.1%)
- Mean ± Std
- 6.35 ± 3.48
- Median ± IQR
- 7.00 ± 6.00
- Min | Max
- 1.00 | 12.0
date_first_hired_day
Float32DType- Null values
- 0 (0.0%)
- Unique values
- 31 (0.3%)
- Mean ± Std
- 15.3 ± 8.63
- Median ± IQR
- 16.0 ± 14.0
- Min | Max
- 1.00 | 31.0
date_first_hired_total_seconds
Float32DType- Null values
- 0 (0.0%)
- Unique values
-
2,264 (24.5%)
This column has a high cardinality (> 40).
- Mean ± Std
- 1.08e+09 ± 2.94e+08
- Median ± IQR
- 1.12e+09 ± 4.41e+08
- Min | Max
- -1.34e+08 | 1.48e+09
No columns match the selected filter: . You can change the column filter in the dropdown menu above.
| Column 1 | Column 2 | Cramér's V | Pearson's Correlation |
|---|---|---|---|
| date_first_hired_year | date_first_hired_total_seconds | 0.931 | 1.00 |
| date_first_hired_month | date_first_hired_day | 0.114 | -0.0408 |
| date_first_hired_year | date_first_hired_month | 0.0877 | -0.00498 |
| date_first_hired_month | date_first_hired_total_seconds | 0.0865 | 0.0265 |
| date_first_hired_year | date_first_hired_day | 0.0834 | -0.0349 |
| date_first_hired_day | date_first_hired_total_seconds | 0.0819 | -0.0336 |
Please enable javascript
The skrub table reports need javascript to display correctly. If you are displaying a report in a Jupyter notebook and you see this message, you may need to re-execute the cell or to trust the notebook (button on the top right or "File > Trust notebook").
Finally, we can go in the opposite direction: given a column in the input, find out from which input column it was derived.
vectorizer.output_to_input_["department_BOA"]
'department'
Dataframe preprocessing#
Note that "date_first_hired" has been recognized and processed as a datetime
column.
vectorizer.column_to_kind_["date_first_hired"]
'datetime'
But looking closer at our original dataframe, it was encoded as a string.
X["date_first_hired"]
0 09/22/1986
1 09/12/1988
2 11/19/1989
3 05/05/2014
4 03/05/2007
...
9223 11/03/2015
9224 11/28/1988
9225 04/30/2001
9226 09/05/2006
9227 01/30/2012
Name: date_first_hired, Length: 9228, dtype: str
Note the dtype: object in the output above.
Before applying the transformers we specify, the TableVectorizer performs a few
preprocessing steps.
For example, strings commonly used to represent missing values such as "N/A" are
replaced with actual null. As we saw above, columns containing strings that
represent dates (e.g. '2024-05-15') are detected and converted to proper
datetimes.
We can inspect the list of steps that were applied to a given column:
vectorizer.all_processing_steps_["date_first_hired"]
[CleanNullStrings(), DropUninformative(), ToDatetime(), DatetimeEncoder(), {'date_first_hired_day': ToFloat(), 'date_first_hired_month': ToFloat(), ...}]
These preprocessing steps depend on the column:
vectorizer.all_processing_steps_["department"]
[CleanNullStrings(), DropUninformative(), ToStr(), OneHotEncoder(drop='if_binary', dtype='float32', handle_unknown='ignore',
sparse_output=False), {'department_BOA': ToFloat(), 'department_BOE': ToFloat(), ...}]
A simple Pipeline for tabular data#
The TableVectorizer outputs data that can be understood by a scikit-learn
estimator. Therefore we can easily build a 2-step scikit-learn Pipeline
that we can fit, test or cross-validate and that works well on tabular data.
import numpy as np
from sklearn.ensemble import HistGradientBoostingRegressor
from sklearn.model_selection import cross_validate
from sklearn.pipeline import make_pipeline
pipeline = make_pipeline(TableVectorizer(), HistGradientBoostingRegressor())
results = cross_validate(pipeline, X, y)
scores = results["test_score"]
print(f"R2 score: mean: {np.mean(scores):.3f}; std: {np.std(scores):.3f}")
print(f"mean fit time: {np.mean(results['fit_time']):.3f} seconds")
R2 score: mean: 0.912; std: 0.015
mean fit time: 1.628 seconds
Specializing the TableVectorizer for HistGradientBoosting#
The encoders used by default by the TableVectorizer are safe choices for a wide
range of downstream estimators. If we know we want to use it with a HistGradientBoostingRegressor (or
classifier) model, we can make some different choices that are only well-suited for
tree-based models but can yield a faster pipeline.
We make 2 changes.
The HistGradientBoostingRegressor has built-in support for categorical features, so we do not need to one-hot
encode them.
We do need to tell it which features should be treated as categorical with the
categorical_features parameter. In recent versions of scikit-learn, we can set
categorical_features='from_dtype', and it will treat all columns in the input that
have a Categorical dtype as such. Therefore we change the encoder for
low-cardinality columns: instead of OneHotEncoder, we use skrub’s
ToCategorical. This transformer will simply ensure our columns have an actual
Categorical dtype (as opposed to string for example), so that they can be
recognized by the HistGradientBoostingRegressor.
The second change replaces the GapEncoder with a MinHashEncoder.
The GapEncoder is a topic model.
It produces interpretable embeddings in a vector space where distances are meaningful,
which is great for interpretation and necessary for some downstream supervised
learners such as linear models. However fitting the topic model is costly in
computation time and memory. The MinHashEncoder produces features that are not easy
to interpret, but that decision trees can efficiently use to test for the occurrence
of particular character n-grams (more details are provided in its documentation).
Therefore it can be a faster and very effective alternative, when the supervised
learner is built on top of decision trees, which is the case for the HistGradientBoostingRegressor.
The resulting pipeline is identical to the one produced by default by
tabular_pipeline.
from skrub import MinHashEncoder, ToCategorical
vectorizer = TableVectorizer(
low_cardinality=ToCategorical(), high_cardinality=MinHashEncoder()
)
pipeline = make_pipeline(
vectorizer, HistGradientBoostingRegressor(categorical_features="from_dtype")
)
results = cross_validate(pipeline, X, y)
scores = results["test_score"]
print(f"R2 score: mean: {np.mean(scores):.3f}; std: {np.std(scores):.3f}")
print(f"mean fit time: {np.mean(results['fit_time']):.3f} seconds")
R2 score: mean: 0.916; std: 0.011
mean fit time: 0.950 seconds
We can see that this new pipeline achieves a similar score but is fitted much faster.
This is mostly due to replacing GapEncoder with MinHashEncoder (however this makes
the features less interpretable).
Feature importances in the statistical model#
As we just saw, we can fit a MinHashEncoder faster than a GapEncoder. However, the
GapEncoder has a crucial advantage: each dimension of its output space is associated
with a topic which can be inspected and interpreted.
In this section, after training a regressor, we will plot the feature importances.
First, we train another scikit-learn regressor, the RandomForestRegressor:
from sklearn.ensemble import RandomForestRegressor
vectorizer = TableVectorizer() # now using the default GapEncoder
regressor = RandomForestRegressor(n_estimators=50, max_depth=20, random_state=0)
pipeline = make_pipeline(vectorizer, regressor)
pipeline.fit(X, y)
Pipeline(steps=[('tablevectorizer', TableVectorizer()),
('randomforestregressor',
RandomForestRegressor(max_depth=20, n_estimators=50,
random_state=0))])In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
Parameters
Fitted attributes
Parameters
Fitted attributes
['year_first_hired']
Parameters
['date_first_hired']
Parameters
['gender', 'department', 'department_name', 'assignment_category']
Parameters
['division', 'employee_position_title']
Parameters
143 features
| gender_F |
| gender_M |
| gender_nan |
| department_BOA |
| department_BOE |
| department_CAT |
| department_CCL |
| department_CEC |
| department_CEX |
| department_COR |
| department_CUS |
| department_DEP |
| department_DGS |
| department_DHS |
| department_DLC |
| department_DOT |
| department_DPS |
| department_DTS |
| department_ECM |
| department_FIN |
| department_FRS |
| department_HCA |
| department_HHS |
| department_HRC |
| department_IGR |
| department_LIB |
| department_MPB |
| department_NDA |
| department_OAG |
| department_OCP |
| department_OHR |
| department_OIG |
| department_OLO |
| department_OMB |
| department_PIO |
| department_POL |
| department_PRO |
| department_REC |
| department_SHF |
| department_ZAH |
| department_name_Board of Appeals Department |
| department_name_Board of Elections |
| department_name_Community Engagement Cluster |
| department_name_Community Use of Public Facilities |
| department_name_Correction and Rehabilitation |
| department_name_County Attorney's Office |
| department_name_County Council |
| department_name_Department of Environmental Protection |
| department_name_Department of Finance |
| department_name_Department of General Services |
| department_name_Department of Health and Human Services |
| department_name_Department of Housing and Community Affairs |
| department_name_Department of Liquor Control |
| department_name_Department of Permitting Services |
| department_name_Department of Police |
| department_name_Department of Public Libraries |
| department_name_Department of Recreation |
| department_name_Department of Technology Services |
| department_name_Department of Transportation |
| department_name_Ethics Commission |
| department_name_Fire and Rescue Services |
| department_name_Merit System Protection Board Department |
| department_name_Non-Departmental Account |
| department_name_Office of Agriculture |
| department_name_Office of Consumer Protection |
| department_name_Office of Emergency Management and Homeland Security |
| department_name_Office of Human Resources |
| department_name_Office of Human Rights |
| department_name_Office of Intergovernmental Relations Department |
| department_name_Office of Legislative Oversight |
| department_name_Office of Management and Budget |
| department_name_Office of Procurement |
| department_name_Office of Public Information |
| department_name_Office of Zoning and Administrative Hearings |
| department_name_Office of the Inspector General |
| department_name_Offices of the County Executive |
| department_name_Sheriff's Office |
| division_00 |
| division_01 |
| division_02 |
| division_03 |
| division_04 |
| division_05 |
| division_06 |
| division_07 |
| division_08 |
| division_09 |
| division_10 |
| division_11 |
| division_12 |
| division_13 |
| division_14 |
| division_15 |
| division_16 |
| division_17 |
| division_18 |
| division_19 |
| division_20 |
| division_21 |
| division_22 |
| division_23 |
| division_24 |
| division_25 |
| division_26 |
| division_27 |
| division_28 |
| division_29 |
| assignment_category_Parttime-Regular |
| employee_position_title_00 |
| employee_position_title_01 |
| employee_position_title_02 |
| employee_position_title_03 |
| employee_position_title_04 |
| employee_position_title_05 |
| employee_position_title_06 |
| employee_position_title_07 |
| employee_position_title_08 |
| employee_position_title_09 |
| employee_position_title_10 |
| employee_position_title_11 |
| employee_position_title_12 |
| employee_position_title_13 |
| employee_position_title_14 |
| employee_position_title_15 |
| employee_position_title_16 |
| employee_position_title_17 |
| employee_position_title_18 |
| employee_position_title_19 |
| employee_position_title_20 |
| employee_position_title_21 |
| employee_position_title_22 |
| employee_position_title_23 |
| employee_position_title_24 |
| employee_position_title_25 |
| employee_position_title_26 |
| employee_position_title_27 |
| employee_position_title_28 |
| employee_position_title_29 |
| date_first_hired_year |
| date_first_hired_month |
| date_first_hired_day |
| date_first_hired_total_seconds |
| year_first_hired |
Parameters
Fitted attributes
We are retrieving the feature importances:
avg_importances = regressor.feature_importances_
std_importances = np.std(
[tree.feature_importances_ for tree in regressor.estimators_], axis=0
)
indices = np.argsort(avg_importances)[::-1]
And plotting the results:
import matplotlib.pyplot as plt
top_indices = indices[:20]
labels = vectorizer.get_feature_names_out()[top_indices]
plt.figure(figsize=(12, 9))
plt.barh(
y=labels,
width=avg_importances[top_indices],
xerr=std_importances[top_indices],
ecolor="k",
color="b",
alpha=0.5,
)
plt.yticks(fontsize=15)
plt.title("Feature importances")
plt.tight_layout(pad=1)
plt.show()

The GapEncoder creates feature names that show the first 3 most important words in
the topic associated with each feature. As we can see in the plot above, this helps
inspecting the model. If we had used a MinHashEncoder instead, the features would be
much less helpful, with names such as employee_position_title_0,
employee_position_title_1, etc.
We can see that features such the time elapsed since being hired, having a full-time
employment, and the position, seem to be the most informative for prediction. However,
feature importances must not be over-interpreted – they capture statistical
associations rather than causal effects. Moreover, the
fast feature importance method used here suffers from biases favouring features with
larger cardinality, as illustrated in a scikit-learn example.
In general we should prefer permutation_importance(), but it is a slower method.
Conclusion#
In this example, we motivated the need for a simple machine learning
pipeline, which we built using the TableVectorizer and a
HistGradientBoostingRegressor.
We saw that by default, it works well on a heterogeneous dataset.
To better understand our dataset, and without much effort, we were also able to plot the feature importances.
Total running time of the script: (0 minutes 41.675 seconds)
Estimated memory usage: 611 MB