Python pandas — Cars MPG Exercises

preview_player
Показать описание
Sometimes we learn best by doing. Unlike my other videos, I’ll be going through these exercises cold. Sometimes we’ll encounter ambiguous questions, and sometimes I'll be wrong. Learning from our mistakes can be a powerful teacher. So, it’s OK to be wrong now, because we’ll know how to avoid it next time when it counts.

My hope is that you will learn by doing. Why don’t you proceed through the linked exercises before we walk through them together?

This series can be viewed in tandem with my “An Opinionated Guide to pandas“ video series (links below), but it’s not required.

This series is beginner-friendly but aimed most directly at intermediate users.

This Learning by Doing is part of the Combining DataFrames segment from the Opinionated Guide to pandas Series. Here's a link to the GH repo:

Рекомендации по теме
Комментарии
Автор

Really like this series as you guys also show the thinking process. This is more valuable than just "perfect" tutorials. Thanks so much!!

sami
Автор

Really helpful. Love the 2 "assert all(df.col1, df.col2) and np.random.randint() lines of codes. Thumbs up to my guest teacher Paul!

tomparatube
Автор

It is very helpful! Thank you for your contribution!

yogeshmishra
Автор

Hi,
I am a beginner with pandas and i find these exercises very very useful. I sit with the theory class of pandas and then i jump into these exercises that made me relate everything that i learned. Thanks thanks thanks. Keep going

janakiyeluripati
Автор

This was great! As a noobie to programming in general the idea to move away from visually inspecting things was very enlightening to me.

JonnyD
Автор

Phew! Took 30mins to get it all done, mostly on step7!
Functions that were used:
df.info()
df.dropna(axis=1, inplace=True)
len(df)
pd.concat([df1, df2])
np.random.randint(1, 10, size=5)

arhataria
Автор

Hello sir your video is really interesting and simple to learn . I found it really helpful to complete my pandas assignment....keep doing such thing I would suggest is to improve the video quality else everything is

roshnim
Автор

Thanks! 🖤 It was really healpful for me.

MateoEstudiante
Автор

Love this planning to teach this class next year ... awesome stuff

Davidkiania
Автор

Thanks for the video, looking forward to more!

zixinlee
Автор

Since 'mpg' is the name of the first column, it's possible to write cars1 = cars1.loc[:, :'car'] instead of cars1 = cars1.loc[:, 'mpg':'car'].

jimmymesa
Автор

This was really helpful!
Could you please make videos a little more advanced?

PradeepSingh-cnsm
Автор

6:45 all(cars1.columns == cars2.columns) is logically equivalent to not any(cars1.columns != cars2.columns).

jimmymesa
Автор

Print all the rows where the car is a Ford.

jimmymesa