21. Pandas Sampling DataFrame - random rows selection and grouping

preview_player
Показать описание
Pandas - Random Sample of a subset of a DataFrame - rows or columns

Step 1: Random sampling of rows(columns) from DataFrame by sample()
Step 3: Random sample of rows based on column value
Step 4: Conditional DataFrame sampling with numpy and weights
Step 5: Pandas sample rows by group
Bonus: Pandas DataFrame combine head() and tail()

---------------------------------------------------------------------------------------------------------------------------------------------------------------
Code store


Socials

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

Very fast and to the point on each example. Got what I came for, thanks!

matheoszaharopoulos
Автор

I was searching for examples like this. Thank you!

rahuldass
Автор

Thanks for this demo. Any chance of a next on making the App into a GUI (for many shuffling ease)?

DCCfhrue
Автор

Great video, thank U. In "Pandas sample rows by groups" is possible get a percent of the rows of each group as length of the sample?

paullulorojas