Metadata-Version: 2.1
Name: pandaserd
Version: 0.1.2
Summary: Create ERD diagrams from pandas dataframes.
Home-page: https://github.com/nabsabraham/pandas-erd/archive/0.1.2.tar.gz
Author: Nabila Abraham
Author-email: nabila.abraham@gmail.com
License: MIT License
Platform: UNKNOWN
Description-Content-Type: text/markdown
Requires-Dist: pandas

### Create ERD diagram from pandas dataframes
* create an ERD object and add tables and connections between tables
* save the generated dot code to an `output.txt` file containing 
* copy-paste the `output.txt` into a graphviz rendering tool like this [one](https://edotor.net/) 
* the output image at the bottom is generated by using the above link 

###
Example usage:

```
import pandas as pd 
from pandaserd import ERD

df1 = pd.DataFrame(data=[[123, 32, '1 Ottawa Street'], [123, 80, '14 Canada Road']])
df1.columns = ['PERSON', 'AGE', 'ADDRESS']
df2 = pd.DataFrame(data=[[6342, 124123124124, '1992-01-02', 'K012V4'], [3124, 154823124124, '1984-02-02', 'L4Y6S2']])
df2.columns = ['PERSON', 'CREDIT_CARD', 'DOB', 'POSTAL_CODE']

erd = ERD()
erd.add_table(df1, 'PERSON')
erd.add_table(df2, 'CREDIT_CARD')
erd.create_edge('PERSON', 'CREDIT_CARD', left_on='PERSON', right_on='PERSON', right_cardinality='*')
erd.write_to_file('output.txt')

```
![example image](example_erd.png "Title")

### Credits
Largely inspired by this fab [repo](https://pypi.org/project/ERDot/])!
* dot documentation can be found [here](https://www.graphviz.org/pdf/dotguide.pdf)

