Slicing Lexicographically Pandas Code Example

Snippet 1

  Specifically, .loc[] allows you to select all rows with an index lexicographically
using slice notation. This works only if the index is sorted (.sort_index()).
 

Copyright © Code Fetcher 2020

 

 

Leave a comment

Your email address will not be published. Required fields are marked *