text_plain_output_1.png image_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sns

import pandas as pd
df = pd.read_csv('../input/machine-predictive-maintenance-classification/predictive_maintenance.csv')

df_pass = df[df['Target'] == 0]
df_pass = df_pass[df_pass['Failure Type'] == 'No Failure']
df_fail = df[df['Target'] == 1]
df_fail = df_fail[df_fail['Failure Type'] != 'No Failure']
df1 = df[df['Failure Type'] == 'Heat Dissipation Failure']
df2 = df[df['Failure Type'] == 'Power Failure']
df3 = df[df['Failure Type'] == 'Overstrain Failure']
df4 = df[df['Failure Type'] == 'Tool Wear Failure']
df5 = df[df['Failure Type'] == 'Random Failures ']

plt.figure(figsize=(18, 10))
sns.scatterplot(data=df_fail, x='td', y='Torque [Nm]', hue='Failure Type')