Skip to content

A declarative interface to build pipelines using pandas

License

Notifications You must be signed in to change notification settings

vbergeron/pylars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pylars

A declarative interface to build pipelines using pandas.

Installation

Available on pypi :

pip install pylars

Features

  • Declarative and chained interface for most common operations
  • Compile on the fly to a function to reuse and delay computation
  • Basic schema check at each step

Exemple

import pandas
from pylars import Pylar
from pylars.dsl import _
from pylars.dsl import Count

df = pandas.DataFrame({
    "tag": ["a", "a", "b", "b"],
    "val": [1, 2, 5, 4]
})

# build a checked representation of the computation
task = (Pylar("exemple", df.schema)
        .assign(mod4=_.val % 4)
        .filter(_.tag == "a")
        .compile())

# real computation start here
task(df)

About

A declarative interface to build pipelines using pandas

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published