mirror of
https://github.com/koodiklinikka/palkkakysely.git
synced 2026-02-12 01:51:53 +00:00
Use forcibly numeric money for profile report
This commit is contained in:
@@ -87,6 +87,12 @@ def read_data() -> pd.DataFrame:
|
||||
return df
|
||||
|
||||
|
||||
def force_tulot_numeric(df):
|
||||
df["Kuukausipalkka"] = pd.to_numeric(df["Kuukausipalkka"], errors="coerce")
|
||||
df["Vuositulot"] = pd.to_numeric(df["Vuositulot"], errors="coerce")
|
||||
return df
|
||||
|
||||
|
||||
def main():
|
||||
pd.set_option("display.max_column", None)
|
||||
pd.set_option("display.max_rows", None)
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
from data_ingest import read_data
|
||||
from data_ingest import read_data, force_tulot_numeric
|
||||
from pandas_profiling import ProfileReport
|
||||
|
||||
|
||||
def main():
|
||||
df = read_data()
|
||||
df = force_tulot_numeric(df)
|
||||
profile = ProfileReport(df)
|
||||
profile.to_file("out/profiling_report.html")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user