wiheto / teneto

Temporal Network Tools
GNU General Public License v3.0
85 stars 26 forks source link

An error: The object 'TemporalNetwork' can't import dataframe data of weighted network #81

Open Qixi-art opened 3 years ago

Qixi-art commented 3 years ago

Hello!

I get a problems when I run the following:

屏幕截图 2021-09-02 114944

In theory, I import a weighted network by the dataframe data. However, I get an unweighted network with TemporalNetwork object.

屏幕截图 2021-09-02 162015

There is no error when I import the dataframe data, but when I continue to use the tnet with other methods like networkmeasures.temporal_degree_centrality, an error appears.

I can solve my problem with other importing method like list of edge, but I wonder why this situation happens.

wiheto commented 2 years ago

Thanks for raising this. Looks like a bug when importing dataframes! Will take a look.

Qixi-art commented 2 years ago

Thanks for prompt reply. Looking forward to your improvement!

wiheto commented 2 years ago

Update after digging around, looks like the weights are not getting included when importing from df into TemporalNetwork (should have been spotted a long time ago).