I have a question about how PageRank can show the impact of "weight". I want to calculate the PageRank of trade countries using the trade value as a weight, my code is shown below. But what I find is that the results are same as the results that are not weighted. I don't know why.
Could someone help me to understand how to show the "weight" in PageRank calculating?
import networkx as nx
import os
import pandas as pd
data=pd.read_excel('f-e-2016-intermediate-use.xlsx')
G=nx.DiGraph()
teams=data.groupby(['reportercode','partnercode'])
team_names=[name for name,group in teams]
G.add_edges_from(team_names)
a_node=data.groupby(['reportercode'])
source_nodes=[name for name,group in a_node]
b_node=data.groupby(['partnercode'])
target_nodes=[name for name,group in b_node]
nodes=set(source_nodes+target_nodes)
G.add_nodes_from(nodes)
page_rank=nx.pagerank(G,weight='tradevalueus')