Help on Additional data cleaning tasks

Screen Link:

My Code:

Replace this line with your code

What I expected to happen:

What actually happened:

Replace this line with the output/error

So this is in regards to the additional exercise that comes at the end of the mission. I am trying to solve the below one

  • Extract the screen resolution from the screen column.
  • Extract the processor speed from the cpu column.

Any leads as to how to extract these. I tried "laptops[“screen”].str.split(" ").str[4] " but this is giving my NaN for the values which don’t have the 4 space in between. Getting the same thing for processor speed.

Any help/suggestion would be helpful

Try to apply negative indexing in order to get to the last element in a list [-1], this way you extract the data which goes after the last space, no matter how many spaces there are in the string.


Thanks @ksenia.kustanovich… it worked like a charm

1 Like