Any help on this?
Screen Link: https://app.dataquest.io/m/293/data-cleaning-basics/2/cleaning-column-names
My Code: <``````>
for column in laptops.columns:
laptops.columns = new_columns
What I expected to happen:
What actually happened:
I honestly can’t figure out why it gives me an actual vs. expected error. I feel very silly.
The problem is that you are appending the same value. I mean, your
str.strip(column) is doing it’s work but it doesn’t have any place to save it so you need to create a variable first to be able to append that value to new_columns.
Or maybe you can do it in one line