first success maintenance plan
This commit is contained in:
12
prepared_steps/0_cleansing_scripts/SN_SCINstalledBase__c.py
Normal file
12
prepared_steps/0_cleansing_scripts/SN_SCINstalledBase__c.py
Normal file
@ -0,0 +1,12 @@
|
||||
import pandas as pd
|
||||
|
||||
# Load the CSV file
|
||||
df = pd.read_csv('../1_extract_data/results/SCInstalledBase__c.csv')
|
||||
|
||||
# Find duplicates based on SerialNo__c (excluding empty/NaN)
|
||||
duplicates = df[df.duplicated(subset=['SerialNo__c'], keep=False) & df['SerialNo__c'].notna() & (df['SerialNo__c'] != '')]
|
||||
duplicates.to_csv('results/duplicates.csv', index=False)
|
||||
|
||||
# Find rows where SerialNo__c is empty or NaN
|
||||
empty_serials = df[df['SerialNo__c'].isna() | (df['SerialNo__c'] == '')]
|
||||
empty_serials.to_csv('results/empty_serials.csv', index=False)
|
Reference in New Issue
Block a user