Metadata-Version: 2.4
Name: stat_merge
Version: 1.0.0
Summary: A library that runs pre-join analysis.
Author-email: Andrew Romanov <romanoffnv@gmail.com>
License-Expression: MIT
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: pandas
Requires-Dist: tabulate

# Advanced Pre-merge Analysis Library

A library that runs pre-join analysis, giving basic stats on the tables to be joined, prediction on the final table, composite join keys suggestion and also detects potential risks like NaNs or Cartesian Product explosions

```
======================================== Merge on: CUST_NAME ========================================
                    Table 1 Table 2
Rows                  38168   20000
Dtypes      [str, NoneType]   [str]
NaN                    2757       0
Unique                32929   18005
Duplicates             5238    1995
Matches: 23

Left                     Right                    Inner                    Outer
Rows: 38170              Rows: 20001              Rows: 26                 Rows: 58145
Type: multiple-multiple  Type: multiple-multiple  Type: multiple-multiple  Type: multiple-multiple
RAM~: 5.5 MB             RAM~: 2.9 MB             RAM~: 3.8 KB             RAM~: 8.3 MB



------------------------------
💡 COMPOSITE KEY SUGGESTION
------------------------------
Joining on INN: 38168 rows
Joining on composition of {'INN', 'CUST_NAME'}: 37316 rows, reduces duplicates by 4387 rows.

```

## Installation

You can install the library using pip:

```bash
pip install stat-merge 
```

## Importing the Library
```python
import stat_merge as sm
```
## Usage
```python
sm.show(df1, df2) 
```
