String values Using python with pandas Unique ID        Student Name      BMI       LOW BMI        HIGH BMI
HYD_61601_1200  Akshay Kumar Kale   17.0    NON-UNDER BMI   CANCER
YDD_62329_1008  MAMATHA  ERRA      12.9     NON-UNDER BMI   CANCER
HYD_61601_1000  SURESH BATTU       21.49    NON-UNDER BMI   CANCER
HYD_61601_1021  Vishal  Kavali     13.69    NON-UNDER BMI   CANCER
HYD_61601_1212  DIVYATEJA  M       15.5     NON-UNDER BMI   CANCER
MBNR_61413_2003 Aishaarya P        13.39    NON-UNDER BMI   CANCER
MBNR_61413_1230 SUGUNA             21.5     NON-UNDER BMI   CANCER



import numpy as np
import matplotlib.pyplot as plt
import pandas as pd

# Importing the dataset
dataset = pd.read_csv('HB.csv')
dataset.head()
dataset['HB']&lt;12.5
dataset['LOW HB'] = dataset['HB'] &lt; 12.5
dataset['HB']&gt;12.5
dataset['HIGH HB'] = dataset['HB'] &gt; 12.5
temp = {True:'ANEMIA', False:'NON-ANEMIA'}
dataset['LOW HB'] = dataset['LOW HB'].map(temp)
temp = {True:'CANCER', False:'NON-CANCAER'}
dataset['HIGH HB'] = dataset['HIGH HB'].map(temp)


above data and code i just want to know whether i can assign multiple values r not(for example, i want assign to cancer new values like stage 1, stage 2, final stage) if it possible can any suggest me code r condition to be applied
After you answer in comments:

You can add a new column with either new information (coming from another file or other source), or you can do it based on the existing columns. In fact you are already adding new columns in your code.

I will add a new column called STAGE both ways to give you an example of each.

From static data

I assume you have the stages in a list, like this:

stage_data = ['stage 1', 'final stage', 'stage 1', 'final stage',
              'stage 2','stage 1','stage 2',]


If you have the stages of each of the existing rows, you can add it simply as follows:

dataset['STAGE'] = stage_data


NOTE: The length of the list should match the length of your dataset i.e. the length of the pandas DataFrame. Check it with this:

assert len(dataset) == len(stage_data), "The lengths don't match!!"


From a condition on existing columns

# Make new column simply filled with zeros - we will fill it after
dataset['STAGE'] = np.zeros(len(dataset))


Now you can use conditions on existing columns and fill the rows that match with your corresponding stage:

# assume people with BMI above 25 must be `stage 1`
data[dataset.BMI &gt; 25]['STAGE'] = 'stage 1'

# assume people with BMI below 15 must be `final stage`
dataset[dataset.BMI &lt; 15]['STAGE'] = 'final stage`

# Stupid example to fill the gaps and show how you can use two conditions:
dataset[(dataset.BMI &lt;= 25) &amp; (dataset.BMI &gt;= 15)]['STAGE'] = 'stage 2'