Module Expr Str ImportFrom alias alias Import alias Import alias Import alias Import alias Import alias Assign NameStore Str FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameStore body For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Str Expr Call NameLoad BinOpMult Str NameLoad SubscriptLoad Call AttributeLoad NameLoad attr NameLoad Str Index Num For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd NameLoad Str NameLoad Expr Call NameLoad BinOpMult Str BinOpAdd NameLoad Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str With Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str NameStore body For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr body For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd BinOpAdd NameLoad Str NameLoad If Call NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Expr Call NameLoad BinOpAdd BinOpAdd BinOpAdd Str NameLoad Str NameLoad Assign NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad Str Call NameLoad AttributeLoad NameLoad attr Str Call NameLoad NameLoad Return NameLoad Raise Call NameLoad Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad Num body Import alias Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad UnaryOpUSub NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Import alias Import alias Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword Num For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr body If NameLoad body If CompareNotEq AttributeLoad SubscriptLoad NameLoad Index Num attr Str body Expr Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index NameLoad For NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad NameLoad orelse TryExcept body For NameStore Call NameLoad Call NameLoad SubscriptLoad SubscriptLoad NameLoad Index NameLoad Index Num body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword NameLoad keyword NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list
N/A N/A 
Tools to work with root files
At this moment file contains only functions that read ROOT files into pandas
Essential to have ROOT, rootpy, root_numpy to use this function
 __future__ division print_function N/A numpy N/A pandas N/A rootpy N/A rootpy.io N/A rootpy.tree N/A __author__ Alex Rogozhnikov print_root_structure N/A N/A file_name N/A N/A N/A Prints the structure of root file in readable format N/A N/A N/A N/A rootpy io root_open file_name READ root_file N/A N/A N/A path dirs objects N/A N/A root_file walk N/A N/A n_tabs N/A N/A str count path / N/A N/A print N/A n_tabs N/A N/A N/A str split path / N/A -1 N/A objName objects N/A N/A obj N/A N/A root_file Get N/A N/A path / objName N/A N/A print N/A N/A n_tabs 1 obj N/A root2pandas N/A N/A file_name N/A N/A N/A Reads some ROOT file to pandas, finds the first tree and converts it. N/A N/A N/A N/A rootpy io root_open file_name READ root_file N/A N/A N/A path dirs objects N/A N/A root_file walk N/A N/A objName objects N/A N/A obj N/A N/A root_file Get N/A N/A path / objName N/A N/A isinstance obj N/A N/A rootpy tree Tree N/A N/A N/A print N/A N/A N/A Adding a tree named  objName  from file  file_name N/A tree obj N/A numpy_array N/A N/A tree to_array N/A dataframe N/A N/A pandas DataFrame numpy_array N/A N/A print success, features: N/A len N/A dataframe columns events N/A len dataframe N/A dataframe N/A N/A RuntimeError N/A N/A Nothing found in the file {} format file_name N/A tree2pandas N/A N/A filename treename branches start stop selection clip N/A None None None None 1e+33 N/A N/A root_numpy N/A data N/A N/A root_numpy root2array filenames filename treename treename branches branches selection selection start start stop stop N/A data N/A N/A pandas DataFrame data N/A N/A clip None N/A N/A data N/A N/A numpy clip data N/A clip clip N/A data N/A list_flat_branches N/A N/A filename treename use_dtype N/A True N/A N/A  Lists branches in the file, vector branches, say D_p, turns into D_p[0], D_p[1], D_p[2], D_p[3].
    First event is used to count number of components
    :param filename: filename
    :param treename: name of tree
    :return: list of strings
     N/A root_numpy N/A numpy N/A result N/A N/A data N/A N/A root_numpy root2array filename treename treename stop 1 N/A N/A branch value N/A N/A N/A N/A data dtype fields items N/A N/A use_dtype N/A N/A N/A N/A N/A value N/A 0 name object N/A N/A N/A N/A result append branch N/A N/A matrix N/A N/A numpy array N/A list N/A data N/A branch N/A index N/A range N/A N/A matrix shape N/A 1 N/A N/A N/A N/A result append N/A N/A {}[{}] format branch index N/A N/A N/A N/A index N/A range N/A len N/A N/A data N/A branch N/A 0 N/A N/A N/A N/A result append N/A N/A {column}[{index}] format column branch index index N/A N/A N/A TypeError N/A N/A N/A N/A result append branch N/A result N/A