get_network_when

get_network_when(tnet, i=None, j=None, t=None, ij=None, logic='and', copy=False, asarray=False, netshape=None, nettype=None)[source]

Returns subset of dataframe that matches index

Parameters:
  • tnet (df, array or teneto.TemporalNetwork) – teneto.TemporalNetwork object or pandas dataframe edgelist
  • i (list or int) – get nodes in column i (source nodes in directed networks)
  • j (list or int) – get nodes in column j (target nodes in directed networks)
  • t (list or int) – get edges at this time-points.
  • ij (list or int) – get nodes for column i or j (logic and can still persist for t). Cannot be specified along with i or j
  • logic (str) – options: ‘and’ or ‘or’. If ‘and’, functions returns rows that corrspond that match all i,j,t arguments. If ‘or’, only has to match one of them
  • copy (bool) – default False. If True, returns a copy of the dataframe. Note relevant if hd5 data.
  • asarray (bool) – default False. If True, returns the list of edges as a numpy array.
Returns:

df – Unless asarray are set to true.

Return type:

pandas dataframe