News for hackers. Stuff that matters.
Re:Anti-Patterns in Python Programming by blossoms on Wednesday July 09, 2014 @10:06AM (#8009660)
I don't mean to be pedantic, but a list (I am assuming df is a list) requires an int.

(That sentence I wrote about using hashable types need not apply, sorry!)

If you ran that code, you would get this error:

    TypeError: list indices must be integers, not list
Re:Anti-Patterns in Python Programming by gipp on Wednesday July 09, 2014 @10:15AM (#8009703)
That's a pandas dataframe (idiomatically denoted df), not a list. It has funky slicing properties, and he's selecting columns of the dataframe in a perfectly valid way.