Lesson 3/4 Rossmann Python Help


(Marius) #1

Hey guys,
I’m currently working through the rossmann dataset and I’m trying to do the same with the titanic dataset from kaggle.

I don’t really understand the following code:

joined = joined[cat_vars+contin_vars+[dep, 'Date']].copy()

What does this adding of the indices do in python/pandas? And why does Jeremy do it?

EDIT: I do understand now that the “addition” in the indizes is actually array concatenation. But why does he copy the array here basically? Is the point the reordering of the columns?