Metadata-Version: 2.1
Name: eventchain
Version: 0.0.1
Summary: Simplified Chain Analytics
Home-page: https://github.com/tkanngiesser/eventchain
Author: tkanngiesser
Author-email: tinokanngiesser@gmail.com
License: Apache Software License 2.0
Keywords: nbdev jupyter notebook python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas
Requires-Dist: scipy
Provides-Extra: dev

# eventchain

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

This file will become your README and also the index of your
documentation.

## Install

``` sh
pip install eventchain
```

## How to use

Fill me in please! Don’t forget code examples:

``` python
import pandas as pd
from eventchain.core import *
```

``` python
visited = pd.read_csv('../data/visited.csv')
purchased = pd.read_csv('../data/purchased.csv')

visited['date'] = pd.to_datetime(visited['date'])
purchased['date'] = pd.to_datetime(purchased['date'])
```

``` python
chain = EventChain(df1=visited, df2=purchased, user_col="user_id", timestamp_col="date", suffix=["landed", "registered"])
```

``` python
chain.first_before_first
```

<div>
<style scoped>
    .dataframe tbody tr th:only-of-type {
        vertical-align: middle;
    }
&#10;    .dataframe tbody tr th {
        vertical-align: top;
    }
&#10;    .dataframe thead th {
        text-align: right;
    }
</style>

|     | user_id | date_landed | date_registered | gap    |
|-----|---------|-------------|-----------------|--------|
| 0   | 1       | 2018-07-01  | 2018-07-02      | 1 days |
| 3   | 5       | 2018-07-10  | 2018-07-11      | 1 days |
| 4   | 6       | 2018-07-07  | 2018-07-10      | 3 days |
| 5   | 8       | 2018-08-01  | 2018-08-02      | 1 days |

</div>
