BDI-pathogens / OpenABM-Covid19

OpenABM-Covid19: an agent-based model for modelling the spread of SARS-CoV-2 (coronavirus) and control interventions for the Covid-19 epidemic
GNU General Public License v3.0
111 stars 76 forks source link

Return pandas dataframe of network with Python interface #196

Closed p-robot closed 3 years ago

p-robot commented 3 years ago

Add functionality to return pd.DataFrame object from Network class. Adds get_network() method to the Network class.
Test of household network between that which is returned as a df and that which is written to file using previous functions.

p-robot commented 3 years ago

This probably needs a little adjustment regarding alignment of the write_network* functions that are already present (the previous functions don't rely on network_id, but they probably should) and the get_network_by_id approach from the Python side of things.