0

I have a Dataframe name Experian_P2 which has a column 'Work_Experience'

Work_Experience column has blank values (interpreted as NaN in Python)

Now i simply want to create a new column with name 'Blank_Work_Ex' where blank rows / records in Work_Experience column are stored as Blank/NaN in Blank_Work_Ex column and non-blanks should have result There_is_Work_Ex

This is the code i am trying

**Blank_Work_Ex = []
for row in Experian_P2['Work_Experience']:
    if row.isnull() == True : Blank_Work_Ex.append('NaN')
    else: Blank_Work_Ex.append('There_is_Work_Ex')
            
Experian_P2['Blank_Work_Ex'] = Blank_Work_Ex**
Wiktor Stribiżew
  • 607,720
  • 39
  • 448
  • 563

0 Answers0