Slicing rows lazily

The previous recipes in this chapter showed how the .iloc and .loc indexers were used to select subsets of both Series and DataFrames in either dimension. A shortcut to select the rows exists with just the indexing operator itself. This is just a shortcut to show additional features of pandas, but the primary function of the indexing operator is actually to select DataFrame columns. If you want to select rows, it is best to use .iloc or .loc, as they are unambiguous.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset