Framex v1.0.3#
Framex is a light-weight dataset fetching library and CLI tool. It is built with minimal dependency requirements and a simple syntax, minimizing overhead and maximizing convenience.
Installation#
pip install framex
uv add framex
poetry add framex
Getting Started#
Framex allows the direct imports of available datasets.
from framex import iris
iris.head()
shape: (5, 5)
| sepal_length | sepal_width | petal_length | petal_width | species |
|---|---|---|---|---|
| f64 | f64 | f64 | f64 | str |
| 5.1 | 3.5 | 1.4 | 0.2 | "setosa" |
| 4.9 | 3.0 | 1.4 | 0.2 | "setosa" |
| 4.7 | 3.2 | 1.3 | 0.2 | "setosa" |
| 4.6 | 3.1 | 1.5 | 0.2 | "setosa" |
| 5.0 | 3.6 | 1.4 | 0.2 | "setosa" |
or loading it using the functional approach.
import framex as fx
mpg = fx.load("mpg")
mpg.head()
shape: (5, 9)
| mpg | cylinders | displacement | horsepower | weight | acceleration | model year | origin | car name |
|---|---|---|---|---|---|---|---|---|
| f64 | i64 | f64 | str | i64 | f64 | i64 | i64 | str |
| 18.0 | 8 | 307.0 | "130" | 3504 | 12.0 | 70 | 1 | "chevrolet chevelle malibu" |
| 15.0 | 8 | 350.0 | "165" | 3693 | 11.5 | 70 | 1 | "buick skylark 320" |
| 18.0 | 8 | 318.0 | "150" | 3436 | 11.0 | 70 | 1 | "plymouth satellite" |
| 16.0 | 8 | 304.0 | "150" | 3433 | 12.0 | 70 | 1 | "amc rebel sst" |
| 17.0 | 8 | 302.0 | "140" | 3449 | 10.5 | 70 | 1 | "ford torino" |
To see (all/local/remote) available datasets. The function also accepts positional “includes” argument for searching.
import framex as fx
both = fx.available()
local = fx.available(option="local")
remote = fx.available(option="remote")
fx.available("st")
{'remote': ['Arrests',
'BirdNest',
'CollegeDistance',
'constants',
'covid_testing',
'Gestation',
'starbucks',
'stars',
'storms',
'usa_states'],
'local': []}