uproot.num_entries

Defined in uproot.models.TTree on line 944.

uproot.models.TTree.num_entries(paths)
Parameters:

paths (str) – The filesystem path or remote URL of the TTree to find the number of entries in. It must have a file path as well as an object path which points to the location of the TTree inside the file. If the file names have colons in them, you can also pass in a dictionary in the format of { file_path : object_path }. Other examples: "rel/file.root:ttree", "C:\abs\file.root:ttree", "http://where/what.root:ttree", "https://username:password@where/secure.root:ttree", "rel/file.root:tdirectory/ttree", iterables of the previous examples.

Returns an iterator over the number of entries over each TTree in the input. This is a shortcut method and reads lesser data than normal file opening.