Jupyter Lab Not Executing cell the same when rerun

I am running under win11. Reinstalled miniconda and Jupyter twice. open file in the created environment. Open csv file into Pandas. Run several types of ‘cleaning’ operations. All ok. Try another (e.g. count nulls in a column. Runs ok once. Restart kernel (due to clear cell output). Try again, key error results but key is there as i used it seconds before. list column names and key is in fact there.

I have JL installed in base, ipykernel etc. in environment. This configuration has worked for months. Windows scan and memory check → no issue.
Crazy!
Thoughts?

You will need to rerun everything when you restart the kernel?

1 Like

Thanks for your interest. As usual, the issue was at my end of the keyboard.
As an FYI, I had used the older syntax for a pandas function. It clobbered the df.
Below is what happened:

change null entries to ‘undefined’

#solv_data = solv_data[‘Type’].fillna(‘undefined’, inplace = True) #OLD STYLE DONT USE
solv_data.fillna( {‘Type’ : ‘undefined’ }, inplace = True ) #Correct syntax