Python Day 43 – pandas indexes and augmented assignment

Technically I finished the Pandas module today although I’m learning more and more that there’s a lot I have yet to understand about Pandas hah.

I learned:

You can .set_index(“column name”) of a dataset so the index number becomes any column you choose.

Augmented assignments are a more efficient way of formatting code (usually by combining the operation with an equals sign so it avoids you writing a variable name twice). For instance, instead of writing:

guesses = guesses + 1

…one can write:

guesses +=1

I don’t completely understand how this works in other instances (like with +, *, etc) yet, but I will figure it out sometime soon.

Leave a Reply

Discover more from

Subscribe now to keep reading and get access to the full archive.

Continue reading