Document processing module

This commit is contained in:
coolneng 2020-06-15 02:05:13 +02:00
parent 8307a54fe0
commit 3af0605449
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 6 additions and 0 deletions

View File

@ -2,12 +2,18 @@ from app.preprocessing import create_dataframe, create_map
def create_table(df) -> str:
"""
Renders an HTML table from a DataFrame
"""
df.fillna(value=0, inplace=True)
table = df.to_html(classes=["table-striped", "table-sm", "table-responsive"])
return table
def process_data(dataset):
"""
Creates the DataFrame, produces a map and returns a table
"""
df = create_dataframe(dataset)
table = create_table(df)
create_map(df)