hipom_data_mapping/analysis/categories/label_print.py

36 lines
780 B
Python

# %%
# we need to create the mdm_list
# import the full mdm-only file
import pandas as pd
data_path = '../../data_import/exports/data_mapping_mdm.csv'
full_df = pd.read_csv(data_path, skipinitialspace=True)
mdm_list = sorted(list((set(full_df['pattern']))))
# %%
full_df
# %%
mask1 = full_df['thing'] == 'ME1TurboCharger1'
mask2 = full_df['property'] == 'LOInletPress'
mask = mask1 & mask2
full_df[mask]
# %%
len(mdm_list)
# %%
thing_property = full_df['thing'] + full_df['property']
thing_property = thing_property.to_list()
tp_list = sorted(list(set(thing_property)))
# %%
len(tp_list)
# %%
data_path = '../../data_import/exports/raw_data.csv'
df = pd.read_csv(data_path, skipinitialspace=True)
# %%
bad_df = df[~df['MDM']]
# %%
bad_df[bad_df['thing'] == '$UNMAPPED']
# %%