df.Transmission.unique()
array(['Manual', 'DL9C', 'Automatic', 'DL5C', 'HR26', 'DL10', 'HR87',
'HR29', 'UP16', 'DL6C', 'DL1C', 'DL2C', 'KA04', 'KA01', 'KA05',
'KA02', 'KA41', 'KA51', 'KA53', 'KA50', 'KA03', 'KA22', 'KA09',
'MH05', 'MH46', 'MH48', 'MH43', 'MH01', 'MH47', 'MH03', 'MH04',
'MH02'], dtype=object)
df['InsuranceType'].unique()
array(['Third Party insurance', 'Manual', 'Not Available', 'Automatic',
'Third Party'], dtype=object)
I want to swap these two column values at particular location. I m confused to how to do this
I tried to replace the values using
if df[(df['Transmission'] != 'Manual') | (df['Transmission'] != 'Automatic')]:
df['Transmission'] = 'Manual'
Manual being the mode of the column.
But No Luck it didnt work