Skip to content

machow/funneljoin-py

Repository files navigation

funneljoin-py

A python port of the funneljoin R package, by Emily Robinson

Build Status

Examples

from funneljoin import after_join, get_example_data

landed, registered = get_example_data()
landed
user_id timestamp
0 1 2018-07-01
1 2 2018-07-01
2 3 2018-07-02
3 4 2018-07-01
4 4 2018-07-04
5 5 2018-07-10
6 5 2018-07-12
7 6 2018-07-07
8 6 2018-07-08

9 rows × 2 columns

registered
user_id timestamp
0 1 2018-07-02
1 3 2018-07-02
2 4 2018-06-10
3 4 2018-07-02
4 5 2018-07-11
5 6 2018-07-10
6 6 2018-07-11
7 7 2018-07-07

8 rows × 2 columns

after_join(
    landed, registered,
    by_user = "user_id", by_time = "timestamp",
    mode = "inner", type = "any-firstafter"
    )
user_id timestamp_x timestamp_y
0 1 2018-07-01 2018-07-02
1 3 2018-07-02 2018-07-02
2 4 2018-07-01 2018-07-02
3 5 2018-07-10 2018-07-11
4 6 2018-07-07 2018-07-10
5 6 2018-07-08 2018-07-10

6 rows × 3 columns

About

A python port of funneljoin, by Emily Robinson

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published