0%
  
  
  
  
    
      
      
  
  
  
  
    
    
      
      
      
    
    
      
    
      
    
    
    
    
        | 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 
 | import pandas as pd
 
 df = pd.read_pickle('data/WM-811K-simple-test.pkl')
 
 df['failureNum'] = df.failureType
 mapping = {'Center': 0, 'Donut': 1, 'Edge-Loc': 2, 'Edge-Ring': 3,
 'Loc': 4, 'Near-full': 5, 'Random': 6, 'Scratch': 7, 'none': 8}
 
 df = df.replace({'failureNum': mapping})
 
 df = df[(df['failureNum'] >= 0) & (df['failureNum'] <= 8)]
 
 df = df.drop(['failureType'], axis=1)
 
 df.to_pickle('./data/WM-811K-torch.pkl')
 
 |