df = df['Consequence Number'].fillna("CLS" + df.index.astype(str))
I did try the above solution along with iterating rows
for index in priority_cls.iterrows():
if priority_cls['Consequence Number'].isna() == True:
priority_cls['Consequence Number'] = 'CLS00'+ str(priority_cls['ConsequenceNumber'].isnull().sum())
The error is as follows:
TypeError: "value" parameter must be a scalar, dict or Series, but you passed a "Index"
Convert your Index
to_series:Example:
Output: