Framex v1.0.3#

PyPI version License: Apache 2.0 Powered by Polars

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_lengthsepal_widthpetal_lengthpetal_widthspecies
f64f64f64f64str
5.13.51.40.2"setosa"
4.93.01.40.2"setosa"
4.73.21.30.2"setosa"
4.63.11.50.2"setosa"
5.03.61.40.2"setosa"

or loading it using the functional approach.

import framex as fx

mpg = fx.load("mpg")
mpg.head()
shape: (5, 9)
mpgcylindersdisplacementhorsepowerweightaccelerationmodel yearorigincar name
f64i64f64stri64f64i64i64str
18.08307.0"130"350412.0701"chevrolet chevelle malibu"
15.08350.0"165"369311.5701"buick skylark 320"
18.08318.0"150"343611.0701"plymouth satellite"
16.08304.0"150"343312.0701"amc rebel sst"
17.08302.0"140"344910.5701"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': []}