Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def dat_to_df(self):
'''
Export Pandas DataFrams (will be deprecated).
'''
return data_formats.dat_to_df(self)
else:
self.col_cats = col_cats
self.meta_cat = True
if isinstance(meta_row, pd.DataFrame):
self.meta_row = meta_row
if row_cats is None:
self.row_cats = meta_row.columns.tolist()
else:
self.row_cats = row_cats
self.meta_cat = True
data_formats.df_to_dat(self, df, define_cat_colors=True)
def df_to_dat(self, df, define_cat_colors=False):
'''
Load Pandas DataFrame (will be deprecated).
'''
data_formats.df_to_dat(self, df, define_cat_colors)
def load_data_to_net(net, inst_net):
''' load data into nodes and mat, also convert mat to numpy array'''
net.dat['nodes'] = inst_net['nodes']
net.dat['mat'] = inst_net['mat']
data_formats.mat_to_numpy_arr(net)