Open chenlee1990 opened 3 years ago
when I write this line berri_bikes.loc[:, 'weekday'] = berri_bikes.index.weekday
If we run then we will see the bug: TypeError:unhashable type:'slice'
Anyone can tell me what happen and how to fix the bug?
the problem is sloved
What was the fix? I seem to run into the same problem.
edit: apparently when creating berri_bikes it is essential to use the double brackets: berri_bikes = bikes[['Berri 1']].copy()
when I write this line berri_bikes.loc[:, 'weekday'] = berri_bikes.index.weekday
If we run then we will see the bug: TypeError:unhashable type:'slice'
Anyone can tell me what happen and how to fix the bug?