MENU

Fun & Interesting

How do I select multiple rows and columns from a pandas DataFrame?

Data School 353,650 lượt xem 8 years ago
Video Not Working? Fix It Now

Have you ever been confused about the "right" way to select rows and columns from a DataFrame? pandas gives you an incredible number of options for doing so, but in this video, I'll outline the current best practices for row and column selection using the loc, iloc, and ix methods.

SUBSCRIBE to learn data science with Python:
https://www.youtube.com/dataschool?sub_confirmation=1

JOIN the "Data School Insiders" community and receive exclusive rewards:
https://www.patreon.com/dataschool

== RESOURCES ==
GitHub repository for the series: https://github.com/justmarkham/pandas-videos
"loc" documentation: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.loc.html
"iloc" documentation: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.iloc.html
"ix" documentation: http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.ix.html
Summary of the pandas API for selection: https://github.com/pydata/pandas/issues/9595

== LET'S CONNECT! ==
Newsletter: https://www.dataschool.io/subscribe/
Twitter: https://twitter.com/justmarkham
Facebook: https://www.facebook.com/DataScienceSchool/
LinkedIn: https://www.linkedin.com/in/justmarkham/

Comment