import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import LabelEncoder
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import accuracy_score
from flask import flash
import numpy as np


def check(X, clf):
   # print("TTTTTTTTTTTTThis is XXXXXXXXXXXX")
   # print(X)
    X = np.array(X)
    labelencoder_X_1 = LabelEncoder()
    X[:, 1] = labelencoder_X_1.fit_transform(X[:, 1])
    labelencoder_X_2 = LabelEncoder()
    X[:, 2] = labelencoder_X_2.fit_transform(X[:, 2])
    labelencoder_X_5 = LabelEncoder()
    X[:, 5] = labelencoder_X_5.fit_transform(X[:, 5])
    labelencoder_X_6 = LabelEncoder()
    X[:, 6] = labelencoder_X_6.fit_transform(X[:, 6])
    labelencoder_X_7 = LabelEncoder()
    X[:, 7] = labelencoder_X_7.fit_transform(X[:, 7])
    labelencoder_X_9 = LabelEncoder()
    X[:, 9] = labelencoder_X_9.fit_transform(X[:, 9])
    labelencoder_X_12 = LabelEncoder()
    X[:, 12] = labelencoder_X_12.fit_transform(X[:, 12])
    p = clf.predict(X)
    t = ()
    for x in p:
        if x == 0:
            a = 'No'
        else:
            a = 'Yes'
        t = t+(a,)
    return t


def analyze(df, clf):
    feature_importances = pd.DataFrame(clf.feature_importances_, index=['Age', 'BusinessTravel', 'Department', 'DistanceFromHome', 'Education', 'EducationField', 'Gender', 'JobRole', 'JobSatisfaction', 'MaritalStatus', 'MonthlyIncome', 'NumCompaniesWorked', 'OverTime', 'PercentSalaryHike', 'YearsInCurrentRole', 'YearsSinceLastPromotion'],columns=['importance']).sort_values('importance',ascending=False)
    feature_importances['x1'] = feature_importances.index
    ax = feature_importances.plot.bar(x='x1', y='importance', rot=90)
    plt.savefig('templates/graphs/raw/feature_importances.png', frameon=True)

    intervals = [x for x in range(0, 22000, 2000)]
    categories = ['<'+str(x) for x in range(2000, 22000, 2000)]
    df1 = df
    df1['Income_Categories'] = pd.cut(df.MonthlyIncome, intervals, labels=categories)
    ax = sns.countplot(x="Income_Categories", hue="Attrition", palette="Set1", data=df1)
    ax.set(title="Monthly Income vs Attrition", xlabel="Income group", ylabel="Total")
    plt.xticks(rotation=-30)
    plt.savefig('templates/graphs/raw/MIvsAttr.png')

    intervals = [x for x in range(18,63,3)]
    categories = ['<'+str(x) for x in range(21,63,3)]
    df1 = df
    df1['Age_Categories'] = pd.cut(df.Age, intervals, labels=categories)
    ax = sns.countplot(x="Age_Categories", hue="Attrition", palette="Set1", data=df1)
    ax.set(title="Age vs Attrition", xlabel="Age group", ylabel="Total")
    plt.xticks(rotation=-30)
    plt.savefig('templates/graphs/raw/AgevsAttr.png')

    intervals = [x for x in range(0,32,2)]
    categories = ['<'+str(x) for x in range(2,32,2)]
    df1 = df
    df1['Distance_from_home'] = pd.cut(df.DistanceFromHome, intervals, labels=categories)
    ax = sns.countplot(x="Distance_from_home", hue="Attrition", palette="Set1", data=df1)
    ax.set(title="Distance from home vs Attrition", xlabel="Distance", ylabel="Total")
    plt.xticks(rotation=-30)
    plt.savefig('templates/graphs/raw/DistanceFromHomevsAttr.png')

    ax = sns.countplot(x="PercentSalaryHike", hue="Attrition", palette="Set1", data=df1)
    ax.set(title="Salary Hike Percentage vs Attrition", xlabel="Salary Hike Percentage", ylabel="Total")
    plt.savefig('templates/graphs/raw/PercentSalaryHikevsAttr.png')

    ax = sns.countplot(x="NumCompaniesWorked", hue="Attrition", palette="Set1", data=df1)
    ax.set(title="Number Of Previously Worked Companies vs Attrition", xlabel="Number Of Previously Worked Companies", ylabel="Total")
    plt.savefig('templates/graphs/raw/NPWCvsAttr.png')

    intervals = [x for x in range(0,22,2)]
    categories = ['<'+str(x) for x in range(2,22,2)]
    df1 = df
    df1['Current_Role'] = pd.cut(df.YearsInCurrentRole, intervals, labels=categories)
    ax = sns.countplot(x="Current_Role", hue="Attrition", palette="Set1", data=df1)
    ax.set(title="Number Of Years in Current Role vs Attrition", xlabel="Number Of Years in Current Role", ylabel="Total")
    plt.xticks(rotation=-30)
    plt.savefig('templates/graphs/raw/YICRvsAttr.png')

    ax = sns.countplot(x="OverTime", hue="Attrition", palette="Set1", data=df1)
    ax.set(title="Over Time vs Attrition", xlabel="Over Time", ylabel="Total")
    plt.savefig('templates/graphs/raw/OverTimevsAttr.png')

    ax = sns.countplot(x="JobRole", hue="Attrition", palette="Set1", data=df1)
    ax.set(title="Job Role vs Attrition", xlabel="Job Role", ylabel="Total")
    plt.xticks(rotation=70)
    plt.savefig('templates/graphs/raw/JobRolevsAttr.png')

    intervals = [x for x in range(0,18,2)]
    categories = ['<'+str(x) for x in range(2,18,2)]
    df1 = df
    df1['Promotion'] = pd.cut(df.YearsSinceLastPromotion, intervals, labels=categories)
    ax = sns.countplot(x="Promotion", hue="Attrition", palette="Set1", data=df1)
    ax.set(title="Number of Years since Promotion vs Attrition", xlabel="Number of Years since Promotion", ylabel="Total")
    plt.xticks(rotation=-30)
    plt.savefig('templates/graphs/raw/YSCPvsAttr.png')

    ax = sns.countplot(x="MaritalStatus", hue="Attrition", palette="Set1", data=df1)
    ax.set(title="Marital Status vs Attrition", xlabel="Marital Status", ylabel="Total")
    plt.savefig('templates/graphs/raw/MSvsAttr.png')


def run(data):
    df = pd.read_csv('original_dataset.csv')
    skills = df['Skills'].tolist()
   # print("SKKKKKKKKKKKKKKKILLLLLLLLLLLLLLLS")
   # print(skills)
    df = df.drop(['DailyRate', 'EmployeeCount', 'YearsAtCompany', 'TotalWorkingYears', 'JobLevel', 'HourlyRate', 'MonthlyRate', 'Over18', 'StandardHours', 'EnvironmentSatisfaction', 'JobInvolvement', 'PerformanceRating', 'TrainingTimesLastYear', 'RelationshipSatisfaction', 'StockOptionLevel', 'WorkLifeBalance', 'YearsWithCurrManager'], axis=1)
    df = df[['Attrition', 'Age', 'BusinessTravel', 'Department', 'DistanceFromHome', 'Education', 'EducationField', 'Gender', 'JobRole', 'JobSatisfaction', 'MaritalStatus', 'MonthlyIncome', 'NumCompaniesWorked', 'OverTime', 'PercentSalaryHike', 'YearsInCurrentRole', 'YearsSinceLastPromotion']]
    
    #print("These re SKILSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS")
    #print(skills)
    
    X = df.iloc[:, 1:].values
    y = df.iloc[:, 0].values

    labelencoder_X_1 = LabelEncoder()
    X[:, 1] = labelencoder_X_1.fit_transform(X[:, 1])
    labelencoder_X_2 = LabelEncoder()
    X[:, 2] = labelencoder_X_2.fit_transform(X[:, 2])
    labelencoder_X_5 = LabelEncoder()
    X[:, 5] = labelencoder_X_5.fit_transform(X[:, 5])
    labelencoder_X_6 = LabelEncoder()
    X[:, 6] = labelencoder_X_6.fit_transform(X[:, 6])
    labelencoder_X_7 = LabelEncoder()
    X[:, 7] = labelencoder_X_7.fit_transform(X[:, 7])
    labelencoder_X_9 = LabelEncoder()
    X[:, 9] = labelencoder_X_9.fit_transform(X[:, 9])
    labelencoder_X_12 = LabelEncoder()
    X[:, 12] = labelencoder_X_12.fit_transform(X[:, 12])

    X = X.astype(float)
    labelencoder_y = LabelEncoder()
    y = labelencoder_y.fit_transform(y)
    X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.40,random_state=0)

    clf = RandomForestClassifier(n_estimators=200)
    clf.fit(X_train,y_train)
    p = clf.predict(X_test)
    acc = accuracy_score(y_test,p)*100
    flash(acc)
    X = [list(elem) for elem in data]
    [r.pop(0) for r in X]
    #print("####### THIS IS XXXX##########")
    #print(X)
    att = check(X, clf)
    skills = skills[:(len(att)):]
    print("LLLLLLLLLLLLLLLENGHT" + str(len(att)) +" " + str(len(skills)))
    
    i = 0
    for row in att:
        X[i].insert(0, row)
        i = i+1
    df1 = pd.DataFrame(X)
    df1.columns=['Attrition', 'Age', 'BusinessTravel', 'Department', 'DistanceFromHome', 'Education', 'EducationField', 'Gender', 'JobRole', 'JobSatisfaction', 'MaritalStatus', 'MonthlyIncome', 'NumCompaniesWorked', 'OverTime', 'PercentSalaryHike', 'YearsInCurrentRole', 'YearsSinceLastPromotion']
    analyze(df, clf)
    df1.to_csv('dataset1.csv')
    return att, skills

[((402, 413), 'numpy.array', 'np.array', (['X'], {}), '(X)\n', (410, 413), True, 'import numpy as np\n'), ((437, 451), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (449, 451), False, 'from sklearn.preprocessing import LabelEncoder\n'), ((529, 543), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (541, 543), False, 'from sklearn.preprocessing import LabelEncoder\n'), ((621, 635), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (633, 635), False, 'from sklearn.preprocessing import LabelEncoder\n'), ((713, 727), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (725, 727), False, 'from sklearn.preprocessing import LabelEncoder\n'), ((805, 819), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (817, 819), False, 'from sklearn.preprocessing import LabelEncoder\n'), ((897, 911), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (909, 911), False, 'from sklearn.preprocessing import LabelEncoder\n'), ((990, 1004), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (1002, 1004), False, 'from sklearn.preprocessing import LabelEncoder\n'), ((1782, 1855), 'matplotlib.pyplot.savefig', 'plt.savefig', (['"""templates/graphs/raw/feature_importances.png"""'], {'frameon': '(True)'}), "('templates/graphs/raw/feature_importances.png', frameon=True)\n", (1793, 1855), True, 'import matplotlib.pyplot as plt\n'), ((2016, 2070), 'pandas.cut', 'pd.cut', (['df.MonthlyIncome', 'intervals'], {'labels': 'categories'}), '(df.MonthlyIncome, intervals, labels=categories)\n', (2022, 2070), True, 'import pandas as pd\n'), ((2080, 2159), 'seaborn.countplot', 'sns.countplot', ([], {'x': '"""Income_Categories"""', 'hue': '"""Attrition"""', 'palette': '"""Set1"""', 'data': 'df1'}), "(x='Income_Categories', hue='Attrition', palette='Set1', data=df1)\n", (2093, 2159), True, 'import seaborn as sns\n'), ((2251, 2275), 'matplotlib.pyplot.xticks', 'plt.xticks', ([], {'rotation': '(-30)'}), '(rotation=-30)\n', (2261, 2275), True, 'import matplotlib.pyplot as plt\n'), ((2280, 2328), 'matplotlib.pyplot.savefig', 'plt.savefig', (['"""templates/graphs/raw/MIvsAttr.png"""'], {}), "('templates/graphs/raw/MIvsAttr.png')\n", (2291, 2328), True, 'import matplotlib.pyplot as plt\n'), ((2469, 2513), 'pandas.cut', 'pd.cut', (['df.Age', 'intervals'], {'labels': 'categories'}), '(df.Age, intervals, labels=categories)\n', (2475, 2513), True, 'import pandas as pd\n'), ((2523, 2599), 'seaborn.countplot', 'sns.countplot', ([], {'x': '"""Age_Categories"""', 'hue': '"""Attrition"""', 'palette': '"""Set1"""', 'data': 'df1'}), "(x='Age_Categories', hue='Attrition', palette='Set1', data=df1)\n", (2536, 2599), True, 'import seaborn as sns\n'), ((2677, 2701), 'matplotlib.pyplot.xticks', 'plt.xticks', ([], {'rotation': '(-30)'}), '(rotation=-30)\n', (2687, 2701), True, 'import matplotlib.pyplot as plt\n'), ((2706, 2755), 'matplotlib.pyplot.savefig', 'plt.savefig', (['"""templates/graphs/raw/AgevsAttr.png"""'], {}), "('templates/graphs/raw/AgevsAttr.png')\n", (2717, 2755), True, 'import matplotlib.pyplot as plt\n'), ((2898, 2955), 'pandas.cut', 'pd.cut', (['df.DistanceFromHome', 'intervals'], {'labels': 'categories'}), '(df.DistanceFromHome, intervals, labels=categories)\n', (2904, 2955), True, 'import pandas as pd\n'), ((2965, 3050), 'seaborn.countplot', 'sns.countplot', ([], {'x': '"""Distance_from_home"""', 'hue': '"""Attrition"""', 'palette': '"""Set1"""', 'data': 'df1'}), "(x='Distance_from_home', hue='Attrition', palette='Set1', data=df1\n    )\n", (2978, 3050), True, 'import seaborn as sns\n'), ((3137, 3161), 'matplotlib.pyplot.xticks', 'plt.xticks', ([], {'rotation': '(-30)'}), '(rotation=-30)\n', (3147, 3161), True, 'import matplotlib.pyplot as plt\n'), ((3166, 3228), 'matplotlib.pyplot.savefig', 'plt.savefig', (['"""templates/graphs/raw/DistanceFromHomevsAttr.png"""'], {}), "('templates/graphs/raw/DistanceFromHomevsAttr.png')\n", (3177, 3228), True, 'import matplotlib.pyplot as plt\n'), ((3239, 3318), 'seaborn.countplot', 'sns.countplot', ([], {'x': '"""PercentSalaryHike"""', 'hue': '"""Attrition"""', 'palette': '"""Set1"""', 'data': 'df1'}), "(x='PercentSalaryHike', hue='Attrition', palette='Set1', data=df1)\n", (3252, 3318), True, 'import seaborn as sns\n'), ((3428, 3491), 'matplotlib.pyplot.savefig', 'plt.savefig', (['"""templates/graphs/raw/PercentSalaryHikevsAttr.png"""'], {}), "('templates/graphs/raw/PercentSalaryHikevsAttr.png')\n", (3439, 3491), True, 'import matplotlib.pyplot as plt\n'), ((3502, 3587), 'seaborn.countplot', 'sns.countplot', ([], {'x': '"""NumCompaniesWorked"""', 'hue': '"""Attrition"""', 'palette': '"""Set1"""', 'data': 'df1'}), "(x='NumCompaniesWorked', hue='Attrition', palette='Set1', data=df1\n    )\n", (3515, 3587), True, 'import seaborn as sns\n'), ((3722, 3772), 'matplotlib.pyplot.savefig', 'plt.savefig', (['"""templates/graphs/raw/NPWCvsAttr.png"""'], {}), "('templates/graphs/raw/NPWCvsAttr.png')\n", (3733, 3772), True, 'import matplotlib.pyplot as plt\n'), ((3909, 3968), 'pandas.cut', 'pd.cut', (['df.YearsInCurrentRole', 'intervals'], {'labels': 'categories'}), '(df.YearsInCurrentRole, intervals, labels=categories)\n', (3915, 3968), True, 'import pandas as pd\n'), ((3978, 4052), 'seaborn.countplot', 'sns.countplot', ([], {'x': '"""Current_Role"""', 'hue': '"""Attrition"""', 'palette': '"""Set1"""', 'data': 'df1'}), "(x='Current_Role', hue='Attrition', palette='Set1', data=df1)\n", (3991, 4052), True, 'import seaborn as sns\n'), ((4180, 4204), 'matplotlib.pyplot.xticks', 'plt.xticks', ([], {'rotation': '(-30)'}), '(rotation=-30)\n', (4190, 4204), True, 'import matplotlib.pyplot as plt\n'), ((4209, 4259), 'matplotlib.pyplot.savefig', 'plt.savefig', (['"""templates/graphs/raw/YICRvsAttr.png"""'], {}), "('templates/graphs/raw/YICRvsAttr.png')\n", (4220, 4259), True, 'import matplotlib.pyplot as plt\n'), ((4270, 4340), 'seaborn.countplot', 'sns.countplot', ([], {'x': '"""OverTime"""', 'hue': '"""Attrition"""', 'palette': '"""Set1"""', 'data': 'df1'}), "(x='OverTime', hue='Attrition', palette='Set1', data=df1)\n", (4283, 4340), True, 'import seaborn as sns\n'), ((4424, 4478), 'matplotlib.pyplot.savefig', 'plt.savefig', (['"""templates/graphs/raw/OverTimevsAttr.png"""'], {}), "('templates/graphs/raw/OverTimevsAttr.png')\n", (4435, 4478), True, 'import matplotlib.pyplot as plt\n'), ((4489, 4558), 'seaborn.countplot', 'sns.countplot', ([], {'x': '"""JobRole"""', 'hue': '"""Attrition"""', 'palette': '"""Set1"""', 'data': 'df1'}), "(x='JobRole', hue='Attrition', palette='Set1', data=df1)\n", (4502, 4558), True, 'import seaborn as sns\n'), ((4640, 4663), 'matplotlib.pyplot.xticks', 'plt.xticks', ([], {'rotation': '(70)'}), '(rotation=70)\n', (4650, 4663), True, 'import matplotlib.pyplot as plt\n'), ((4668, 4721), 'matplotlib.pyplot.savefig', 'plt.savefig', (['"""templates/graphs/raw/JobRolevsAttr.png"""'], {}), "('templates/graphs/raw/JobRolevsAttr.png')\n", (4679, 4721), True, 'import matplotlib.pyplot as plt\n'), ((4855, 4919), 'pandas.cut', 'pd.cut', (['df.YearsSinceLastPromotion', 'intervals'], {'labels': 'categories'}), '(df.YearsSinceLastPromotion, intervals, labels=categories)\n', (4861, 4919), True, 'import pandas as pd\n'), ((4929, 5000), 'seaborn.countplot', 'sns.countplot', ([], {'x': '"""Promotion"""', 'hue': '"""Attrition"""', 'palette': '"""Set1"""', 'data': 'df1'}), "(x='Promotion', hue='Attrition', palette='Set1', data=df1)\n", (4942, 5000), True, 'import seaborn as sns\n'), ((5128, 5152), 'matplotlib.pyplot.xticks', 'plt.xticks', ([], {'rotation': '(-30)'}), '(rotation=-30)\n', (5138, 5152), True, 'import matplotlib.pyplot as plt\n'), ((5157, 5207), 'matplotlib.pyplot.savefig', 'plt.savefig', (['"""templates/graphs/raw/YSCPvsAttr.png"""'], {}), "('templates/graphs/raw/YSCPvsAttr.png')\n", (5168, 5207), True, 'import matplotlib.pyplot as plt\n'), ((5218, 5293), 'seaborn.countplot', 'sns.countplot', ([], {'x': '"""MaritalStatus"""', 'hue': '"""Attrition"""', 'palette': '"""Set1"""', 'data': 'df1'}), "(x='MaritalStatus', hue='Attrition', palette='Set1', data=df1)\n", (5231, 5293), True, 'import seaborn as sns\n'), ((5387, 5435), 'matplotlib.pyplot.savefig', 'plt.savefig', (['"""templates/graphs/raw/MSvsAttr.png"""'], {}), "('templates/graphs/raw/MSvsAttr.png')\n", (5398, 5435), True, 'import matplotlib.pyplot as plt\n'), ((5462, 5497), 'pandas.read_csv', 'pd.read_csv', (['"""original_dataset.csv"""'], {}), "('original_dataset.csv')\n", (5473, 5497), True, 'import pandas as pd\n'), ((6417, 6431), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (6429, 6431), False, 'from sklearn.preprocessing import LabelEncoder\n'), ((6509, 6523), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (6521, 6523), False, 'from sklearn.preprocessing import LabelEncoder\n'), ((6601, 6615), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (6613, 6615), False, 'from sklearn.preprocessing import LabelEncoder\n'), ((6693, 6707), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (6705, 6707), False, 'from sklearn.preprocessing import LabelEncoder\n'), ((6785, 6799), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (6797, 6799), False, 'from sklearn.preprocessing import LabelEncoder\n'), ((6877, 6891), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (6889, 6891), False, 'from sklearn.preprocessing import LabelEncoder\n'), ((6970, 6984), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (6982, 6984), False, 'from sklearn.preprocessing import LabelEncoder\n'), ((7088, 7102), 'sklearn.preprocessing.LabelEncoder', 'LabelEncoder', ([], {}), '()\n', (7100, 7102), False, 'from sklearn.preprocessing import LabelEncoder\n'), ((7182, 7235), 'sklearn.model_selection.train_test_split', 'train_test_split', (['X', 'y'], {'test_size': '(0.4)', 'random_state': '(0)'}), '(X, y, test_size=0.4, random_state=0)\n', (7198, 7235), False, 'from sklearn.model_selection import train_test_split\n'), ((7247, 7287), 'sklearn.ensemble.RandomForestClassifier', 'RandomForestClassifier', ([], {'n_estimators': '(200)'}), '(n_estimators=200)\n', (7269, 7287), False, 'from sklearn.ensemble import RandomForestClassifier\n'), ((7388, 7398), 'flask.flash', 'flash', (['acc'], {}), '(acc)\n', (7393, 7398), False, 'from flask import flash\n'), ((7743, 7758), 'pandas.DataFrame', 'pd.DataFrame', (['X'], {}), '(X)\n', (7755, 7758), True, 'import pandas as pd\n'), ((7355, 7380), 'sklearn.metrics.accuracy_score', 'accuracy_score', (['y_test', 'p'], {}), '(y_test, p)\n', (7369, 7380), False, 'from sklearn.metrics import accuracy_score\n'), ((1270, 1624), 'pandas.DataFrame', 'pd.DataFrame', (['clf.feature_importances_'], {'index': "['Age', 'BusinessTravel', 'Department', 'DistanceFromHome', 'Education',\n    'EducationField', 'Gender', 'JobRole', 'JobSatisfaction',\n    'MaritalStatus', 'MonthlyIncome', 'NumCompaniesWorked', 'OverTime',\n    'PercentSalaryHike', 'YearsInCurrentRole', 'YearsSinceLastPromotion']", 'columns': "['importance']"}), "(clf.feature_importances_, index=['Age', 'BusinessTravel',\n    'Department', 'DistanceFromHome', 'Education', 'EducationField',\n    'Gender', 'JobRole', 'JobSatisfaction', 'MaritalStatus',\n    'MonthlyIncome', 'NumCompaniesWorked', 'OverTime', 'PercentSalaryHike',\n    'YearsInCurrentRole', 'YearsSinceLastPromotion'], columns=['importance'])\n", (1282, 1624), True, 'import pandas as pd\n')]