I think I am writing with the correct value but system didn't let me go

Screen Link: Learn data science with Python and R projects

My Code:

unique_ram = laptops["ram"].str.replace("GB","").unique()

What I expected to happen:

Passed

What actually happened:

Value of laptops is not what we expected.
One of your variables doesn't seem to have the correct value. Please re-check the instructions and your code.

While the answer saying this..

laptops["ram"] = laptops["ram"].str.replace('GB','')
unique_ram = laptops["ram"].unique()

The instructions have two separate steps and it is slightly confusing what the final outcome is supposed to be, but, they expect those steps to be run separately for this question.

So, you need to update the ram column separately first as the solution points out.

That’s what the message you get points as well -

The laptops dataframe, specifically the ram column needs to be updated. They are testing for that as well as for the unique_ram variable.