sariabod / codeacademy

intro to data analysis
1 stars 0 forks source link

Remember to use reset_index() with your groupbys #2

Open Caealana opened 6 years ago

Caealana commented 6 years ago

https://github.com/sariabod/codeacademy/blob/56a6d84f2cf3145213a25ec3a9fd028c7b33f216/musclehub_project/musclehub.py#L32

reset_index() will give you index numbers for each row of your data frame. This allows for easy access and retrieval of specific rows in your data frame. Click here for more information on reset_index().

sariabod commented 6 years ago

@Caealana do I need to reset_index() if I do not need the indices? This seems like unneeded processing time (as minimal as it may be).

Caealana commented 6 years ago

Generally, it is good practice to, as you may need use of that particular data frame in the future for applications that require the indices. If you're sure you won't ever need the indices for any possible applications in the future, you can leave it out.

You have great questions! I apologize, but could you refrain from commenting until I finish going over your code? I will mark your project as reviewed once I have finished grading it.

On Tue, Feb 6, 2018 at 11:41 AM, Sam Ariabod notifications@github.com wrote:

@Caealana https://github.com/caealana do I need to reset_index() if I do not need the indices? This seems like unneeded processing time (as minimal as it may be).

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sariabod/codeacademy/issues/2#issuecomment-363483969, or mute the thread https://github.com/notifications/unsubscribe-auth/ANWj4Pe8Si-awk3yi9n-UH6nT5OF72hgks5tSIC0gaJpZM4R7WXy .