Is it possible to get a partial view of a dict
in Python analogous of pandas df.tail()/df.head()
. Say you have a very long dict
, and you just want to check some of the elements (the beginning, the end, etc) of the dict
. Something like:
dict.head(3) # To see the first 3 elements of the dictionary.
{[1,2], [2, 3], [3, 4]}
Thanks