tgsmith61591
skoot
Python

A package for data science practitioners. This library implements a number of helpful, common data transformations with a scikit-learn friendly interface in an effort to expedite the modeling process.

Last updated Mar 16, 2026
57
Stars
11
Forks
7
Issues
0
Stars/day
Attention Score
28
Language breakdown
Python 91.0%
Fortran 6.8%
Shell 1.7%
Makefile 0.5%
Files click to expand
README

codecov Supported versions Supported versions Supported versions CircleCI Build Status

skoot

Skoot is a lightweight python library of machine learning transformer classes that interact with scikit-learn and pandas. Its objective is to expedite data munging and pre-processing tasks that can tend to take up so much of data science practitioners' time. See the documentation for more info.

__Note that skoot is the preferred alternative to the now deprecated skutil library__

Two minutes to model-readiness

Real world data is nasty. Most data scientists spend the majority of their time tackling data cleansing tasks. With skoot, we can automate away so much of the bespoke hacking solutions that consume data scientists' time.

In this example, we'll examine a common dataset (the adult dataset from the UCI machine learning repo) that requires significant pre-processing.

from skoot.datasets import loadadultdf
from skoot.feature_selection import FeatureFilter
from skoot.decomposition import SelectivePCA
from skoot.preprocessing import DummyEncoder
from skoot.utils.dataframe import getnumericcolumns
from skoot.utils.dataframe import getcategoricalcolumns
from sklearn.modelselection import traintest_split
from sklearn.pipeline import Pipeline
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score

load the dataset with the skoot-native loader & split it

adult = loadadultdf(tgt_name="target") y = adult.pop("target") Xtrain, Xtest, ytrain, ytest = traintestsplit( adult, y, randomstate=42, testsize=0.2)

get numeric and categorical feature names

numcols = getnumericcolumns(Xtrain).columns objcols = getcategoricalcolumns(Xtrain).columns

remove the education-num from the num_cols since we're going to remove it

numcols = numcols[~(num_cols == "education-num")]

build a pipeline

pipe = Pipeline([ # drop out the ordinal level that's otherwise equal to "education" ("dropper", FeatureFilter(cols=["education-num"])), # decompose the numeric features with PCA ("pca", SelectivePCA(cols=num_cols)), # dummy encode the categorical features ("dummy", DummyEncoder(cols=objcols, handleunknown="ignore")), # and a simple classifier class ("clf", RandomForestClassifier(nestimators=100, randomstate=42)) ])

pipe.fit(Xtrain, ytrain)

produce predictions

preds = pipe.predict(X_test) print("Test accuracy: %.3f" % accuracyscore(ytest, preds))

For more tutorials, check out the documentation.

🔗 More in this category

© 2026 GitRepoTrend · tgsmith61591/skoot · Updated daily from GitHub